Skip to content

Commit 169edee

Browse files
committed
remove unreachable sign in button in user dropdown
1 parent f042ad4 commit 169edee

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

app/components/TopBar.tsx

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ export function TopBar({ children }: { children: React.ReactNode }) {
2222
// fetch happens in loader wrapping all authed pages
2323
const { me } = useCurrentUser()
2424

25-
const loggedIn = !!me
26-
2725
// toArray filters out nulls, which is essential because the silo/system
2826
// picker is going to come in null when the user isn't supposed to see it
2927
const [cornerPicker, ...otherPickers] = React.Children.toArray(children)
@@ -62,15 +60,9 @@ export function TopBar({ children }: { children: React.ReactNode }) {
6260
</DropdownMenu.Trigger>
6361
<DropdownMenu.Content align="end" sideOffset={8}>
6462
<DropdownMenu.LinkItem to={pb.profile()}>Settings</DropdownMenu.LinkItem>
65-
{loggedIn ? (
66-
<DropdownMenu.Item onSelect={() => logout.mutate({})}>
67-
Sign out
68-
</DropdownMenu.Item>
69-
) : (
70-
<DropdownMenu.Item onSelect={() => navToLogin({ includeCurrent: true })}>
71-
Sign In
72-
</DropdownMenu.Item>
73-
)}
63+
<DropdownMenu.Item onSelect={() => logout.mutate({})}>
64+
Sign out
65+
</DropdownMenu.Item>
7466
</DropdownMenu.Content>
7567
</DropdownMenu.Root>
7668
</div>

0 commit comments

Comments
 (0)