diff --git a/web/components/nav/nav-bar.tsx b/web/components/nav/nav-bar.tsx index 91799cd1..4b042f8a 100644 --- a/web/components/nav/nav-bar.tsx +++ b/web/components/nav/nav-bar.tsx @@ -1,6 +1,5 @@ import Link from 'next/link' -import { useUser } from '../../hooks/use-user' import { HomeIcon, MenuAlt3Icon, @@ -27,7 +26,7 @@ export function BottomNavBar() { diff --git a/web/components/nav/profile-menu.tsx b/web/components/nav/profile-menu.tsx index 01a8fb14..0141c19e 100644 --- a/web/components/nav/profile-menu.tsx +++ b/web/components/nav/profile-menu.tsx @@ -12,6 +12,7 @@ export function getNavigationOptions(user?: User | null) { if (!user) { return [ { name: 'Leaderboards', href: '/leaderboards' }, + { name: 'Communities', href: '/folds' }, { name: 'Discord', href: 'https://discord.gg/eHQBNBqXuh' }, ] } @@ -19,6 +20,7 @@ export function getNavigationOptions(user?: User | null) { return [ { name: 'Add funds', href: '/add-funds' }, { name: 'Leaderboards', href: '/leaderboards' }, + { name: 'Communities', href: '/folds' }, { name: 'Discord', href: 'https://discord.gg/eHQBNBqXuh' }, { name: 'About', href: 'https://docs.manifold.markets' }, { name: 'Sign out', href: '#', onClick: () => firebaseLogout() }, diff --git a/web/components/nav/sidebar.tsx b/web/components/nav/sidebar.tsx index 358d2982..c75cce28 100644 --- a/web/components/nav/sidebar.tsx +++ b/web/components/nav/sidebar.tsx @@ -1,10 +1,13 @@ import { HomeIcon, UserGroupIcon, + CakeIcon, SearchIcon, + ChatIcon, BookOpenIcon, TableIcon, DotsHorizontalIcon, + CashIcon, } from '@heroicons/react/outline' import clsx from 'clsx' import _ from 'lodash' @@ -12,23 +15,35 @@ import Link from 'next/link' import { useRouter } from 'next/router' import { useFollowedFolds } from '../../hooks/use-fold' import { useUser } from '../../hooks/use-user' -import { firebaseLogin } from '../../lib/firebase/users' +import { firebaseLogin, firebaseLogout } from '../../lib/firebase/users' import { ManifoldLogo } from './manifold-logo' import { MenuButton } from './menu' import { getNavigationOptions, ProfileSummary } from './profile-menu' const navigation = [ { name: 'Home', href: '/home', icon: HomeIcon }, - { name: 'Markets', href: '/markets', icon: SearchIcon }, + { name: 'Explore', href: '/markets', icon: SearchIcon }, { name: 'Portfolio', href: '/portfolio', icon: TableIcon }, ] const signedOutNavigation = [ { name: 'Home', href: '/home', icon: HomeIcon }, - { name: 'Markets', href: '/markets', icon: SearchIcon }, + { name: 'Explore', href: '/markets', icon: SearchIcon }, { name: 'About', href: 'https://docs.manifold.markets', icon: BookOpenIcon }, ] +const signedOutMobileNavigation = [ + { name: 'Leaderboards', href: '/leaderboards', icon: CakeIcon }, + { name: 'Communities', href: '/folds', icon: UserGroupIcon }, + { name: 'Discord', href: 'https://discord.gg/eHQBNBqXuh', icon: ChatIcon }, + { name: 'About', href: 'https://docs.manifold.markets', icon: BookOpenIcon }, +] + +const mobileNavigation = [ + { name: 'Add funds', href: '/add-funds', icon: CashIcon }, + ...signedOutMobileNavigation, +] + type Item = { name: string href: string @@ -84,10 +99,12 @@ export default function Sidebar() { folds = _.sortBy(folds, 'followCount').reverse() const navigationOptions = user === null ? signedOutNavigation : navigation + const mobileNavigationOptions = + user === null ? signedOutMobileNavigation : mobileNavigation return ( - ) }