Put back more menu so users can sign out

This commit is contained in:
James Grugett 2022-07-15 01:08:41 -05:00
parent 02aa13f7d1
commit efcfa10323

View File

@ -54,7 +54,13 @@ function getNavigation() {
function getMoreNavigation(user?: User | null) { function getMoreNavigation(user?: User | null) {
if (IS_PRIVATE_MANIFOLD) { if (IS_PRIVATE_MANIFOLD) {
return [{ name: 'Leaderboards', href: '/leaderboards' }] return [
{
name: 'Sign out',
href: '#',
onClick: withTracking(firebaseLogout, 'sign out'),
},
]
} }
if (!user) { if (!user) {
@ -251,6 +257,12 @@ export default function Sidebar(props: { className?: string }) {
{navigationOptions.map((item) => ( {navigationOptions.map((item) => (
<SidebarItem key={item.href} item={item} currentPage={currentPage} /> <SidebarItem key={item.href} item={item} currentPage={currentPage} />
))} ))}
{user && (
<MenuButton
menuItems={getMoreNavigation(user)}
buttonContent={<MoreButton />}
/>
)}
{/* Spacer if there are any groups */} {/* Spacer if there are any groups */}
{memberItems.length > 0 && ( {memberItems.length > 0 && (