Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: updated notifications section url #1185

Merged
merged 2 commits into from
Jan 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading