From d326ae5c3005abd4ea679b384a0dfee6e49011b4 Mon Sep 17 00:00:00 2001 From: Austin Chen Date: Tue, 29 Mar 2022 09:35:33 -0700 Subject: [PATCH] Extract out sidebaricon; link to /about --- web/components/nav/sidebar.tsx | 84 +++++++++++++++++++--------------- 1 file changed, 46 insertions(+), 38 deletions(-) diff --git a/web/components/nav/sidebar.tsx b/web/components/nav/sidebar.tsx index 0352ac2c..cc735227 100644 --- a/web/components/nav/sidebar.tsx +++ b/web/components/nav/sidebar.tsx @@ -1,10 +1,8 @@ import { HomeIcon, - FireIcon, UserGroupIcon, - TrendingUpIcon, SearchIcon, - CollectionIcon, + BookOpenIcon, } from '@heroicons/react/outline' import clsx from 'clsx' import Link from 'next/link' @@ -13,11 +11,15 @@ import { useRouter } from 'next/router' const navigation = [ { name: 'Home', href: '/home', icon: HomeIcon }, { name: 'Markets', href: '/markets', icon: SearchIcon }, - { name: 'Communities', href: '/folds', icon: UserGroupIcon }, - { name: 'Trades', href: '/trades', icon: CollectionIcon }, - // { name: 'Trending', href: '#', icon: TrendingUpIcon, current: false }, + { name: 'About', href: 'https://docs.manifold.markets', icon: BookOpenIcon }, ] +type Item = { + name: string + href: string + icon: React.ComponentType<{ className?: string }> +} + const communities = [ { name: 'Movies', href: '#' }, { name: 'Food', href: '#' }, @@ -29,6 +31,36 @@ const communities = [ { name: 'Gaming', href: '#' }, ] +function SidebarItem(props: { item: Item; currentPage: string }) { + const { item, currentPage } = props + return ( + + + + + ) +} + export default function Sidebar() { const router = useRouter() const currentPage = router.pathname @@ -37,47 +69,23 @@ export default function Sidebar() {