Skip to content

Commit

Permalink
fix: updated notifications section url (#1185)
Browse files Browse the repository at this point in the history
* fix: updated notifiations section url

* fix: updated test cases
  • Loading branch information
awais-ansari authored Jan 9, 2025
1 parent c629dc4 commit 726e077
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/account-settings/AccountSettingsPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ class AccountSettingsPage extends React.Component {
'#basic-information': React.createRef(),
'#profile-information': React.createRef(),
'#social-media': React.createRef(),
'#notifications': React.createRef(),
'#site-preferences': React.createRef(),
'#linked-accounts': React.createRef(),
'#delete-account': React.createRef(),
Expand Down Expand Up @@ -769,8 +770,9 @@ class AccountSettingsPage extends React.Component {
{...editableFieldProps}
/>
</div>
<div className="border border-light-700 my-6" />
<NotificationSettings />
<div id="notifications" ref={this.navLinkRefs['#notifications']}>
<NotificationSettings />
</div>
<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
6 changes: 6 additions & 0 deletions src/account-settings/JumpNav.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ const JumpNav = ({
'basic-information',
'profile-information',
'social-media',
'notifications',
'site-preferences',
'linked-accounts',
'delete-account',
Expand All @@ -41,6 +42,11 @@ const JumpNav = ({
{intl.formatMessage(messages['account.settings.section.social.media'])}
</NavHashLink>
</li>
<li>
<NavHashLink to="#notifications">
{intl.formatMessage(messages['notification.preferences.notifications.label'])}
</NavHashLink>
</li>
<li>
<NavHashLink to="#site-preferences">
{intl.formatMessage(messages['account.settings.section.site.preferences'])}
Expand Down
26 changes: 26 additions & 0 deletions src/account-settings/test/__snapshots__/JumpNav.test.jsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,19 @@ exports[`JumpNav should not render Optional Information or delete account link 1
Social Media Links
</a>
</li>
<li
className=""
>
<a
aria-current="page"
className="active"
href="/#notifications"
isActive={[Function]}
onClick={[Function]}
>
Notifications
</a>
</li>
<li
className=""
>
Expand Down Expand Up @@ -138,6 +151,19 @@ exports[`JumpNav should render Optional Information and delete account link 1`]
Social Media Links
</a>
</li>
<li
className=""
>
<a
aria-current="page"
className="active"
href="/#notifications"
isActive={[Function]}
onClick={[Function]}
>
Notifications
</a>
</li>
<li
className=""
>
Expand Down
1 change: 1 addition & 0 deletions src/notification-preferences/NotificationSettings.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ const NotificationSettings = () => {
return (
showPreferences && (
<Container className="notification-preferences px-0">
<div className="border border-light-700 my-6" />
<h2 className="notification-heading mb-3">
{intl.formatMessage(messages.notificationHeading)}
</h2>
Expand Down

0 comments on commit 726e077

Please sign in to comment.