Skip to content

Commit

Permalink
fix: fixed border issue when no preferences
Browse files Browse the repository at this point in the history
  • Loading branch information
sundasnoreen12 committed Dec 26, 2024
1 parent 7756111 commit 2756568
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/account-settings/AccountSettingsPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -766,7 +766,7 @@ class AccountSettingsPage extends React.Component {
</div>
<div className="border border-light-700 my-6" />
<NotificationSettings />
<div className="border border-light-700 my-6" />
{this.props.showPreferences && <div className="border border-light-700 my-6" />}
<div className="account-section mb-5" id="site-preferences" ref={this.navLinkRefs['#site-preferences']}>
<h2 className="section-heading h4 mb-3">
{this.props.intl.formatMessage(messages['account.settings.section.site.preferences'])}
Expand Down Expand Up @@ -970,6 +970,7 @@ AccountSettingsPage.propTypes = {
navigate: PropTypes.func.isRequired,
location: PropTypes.string.isRequired,
disabledCountries: PropTypes.arrayOf(PropTypes.string),
showPreferences: PropTypes.bool,
};

AccountSettingsPage.defaultProps = {
Expand Down Expand Up @@ -997,6 +998,7 @@ AccountSettingsPage.defaultProps = {
mostRecentVerifiedName: {},
verifiedNameHistory: [],
disabledCountries: [],
showPreferences: false,
};

export default withLocation(withNavigate(connect(accountSettingsPageSelector, {
Expand Down
4 changes: 4 additions & 0 deletions src/account-settings/data/selectors.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { createSelector, createStructuredSelector } from 'reselect';
import { siteLanguageListSelector, siteLanguageOptionsSelector } from '../site-language';
import { compareVerifiedNamesByCreatedDate } from '../../utils';
import { selectShowPreferences } from '../../notification-preferences/data/selectors';

export const storeName = 'accountSettings';

Expand Down Expand Up @@ -243,6 +244,7 @@ export const accountSettingsPageSelector = createSelector(
mostRecentVerifiedNameSelector,
sortedVerifiedNameHistorySelector,
disabledCountriesSelector,
selectShowPreferences(),
(
accountSettings,
siteLanguageOptions,
Expand All @@ -261,6 +263,7 @@ export const accountSettingsPageSelector = createSelector(
mostRecentVerifiedName,
verifiedNameHistory,
disabledCountries,
showPreferences,
) => ({
siteLanguageOptions,
siteLanguage,
Expand All @@ -282,6 +285,7 @@ export const accountSettingsPageSelector = createSelector(
mostRecentVerifiedName,
verifiedNameHistory,
disabledCountries,
showPreferences,
}),
);

Expand Down

0 comments on commit 2756568

Please sign in to comment.