Skip to content

Commit

Permalink
Move notifications entry higher in the account menu
Browse files Browse the repository at this point in the history
  • Loading branch information
255kb committed Feb 5, 2024
1 parent 6ffaf6a commit 072ca05
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 16 deletions.
30 changes: 16 additions & 14 deletions components/account-menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,22 @@ const AccountMenu: FunctionComponent = function () {
Security
</Link>
</li>

<li
className={`list-item ${
router.pathname.includes('account/notifications')
? 'active'
: ''
}`}
>
<Link
href='/account/notifications/'
className='list-link text-reset'
>
Notifications
</Link>
</li>

<li
className={`list-item ${
router.pathname.includes('account/subscription') ? 'active' : ''
Expand Down Expand Up @@ -63,20 +79,6 @@ const AccountMenu: FunctionComponent = function () {
</li>
</>
)}
<li
className={`list-item ${
router.pathname.includes('account/notifications')
? 'active'
: ''
}`}
>
<Link
href='/account/notifications/'
className='list-link text-reset'
>
Notifications
</Link>
</li>
</ul>
</div>
</div>
Expand Down
3 changes: 1 addition & 2 deletions pages/account/notifications.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const AccountNotifications: FunctionComponent = function () {
register: registerFormField,
setValue,
control,
formState: { touchedFields, isDirty }
formState: { isDirty }
} = useForm();
const data = useWatch({ control });

Expand Down Expand Up @@ -83,7 +83,6 @@ const AccountNotifications: FunctionComponent = function () {
});

useEffect(() => {
console.log(isDirty);
if (data && isDirty) {
updateEmailing(data as EmailingStatuses);
}
Expand Down

0 comments on commit 072ca05

Please sign in to comment.