Skip to content

Commit

Permalink
Fix back button on homepage (#4935)
Browse files Browse the repository at this point in the history
* fix back button on homepage

* remove unused import
  • Loading branch information
alexyoung23j authored Sep 5, 2023
1 parent 0d97ef5 commit f07f119
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions packages/commonwealth/client/scripts/views/SublayoutHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,11 @@ export const SublayoutHeader = ({ onMobile }: SublayoutHeaderProps) => {
if (app.isCustomDomain()) {
navigate('/', {}, null);
} else {
navigate('/dashboard/for-you', {}, null);
if (isLoggedIn) {
navigate('/dashboard/for-you', {}, null);
} else {
navigate('/dashboard/global', {}, null);
}
}
}}
/>
Expand Down Expand Up @@ -184,7 +188,11 @@ export const SublayoutHeader = ({ onMobile }: SublayoutHeaderProps) => {
if (app.isCustomDomain()) {
navigate('/', {}, null);
} else {
navigate('/dashboard/for-you', {}, null);
if (isLoggedIn) {
navigate('/dashboard/for-you', {}, null);
} else {
navigate('/dashboard/global', {}, null);
}
}
}}
/>
Expand Down

0 comments on commit f07f119

Please sign in to comment.