Skip to content

Commit

Permalink
Revert "Revert "Add groups to sidebar""
Browse files Browse the repository at this point in the history
This reverts commit 2ba8a59.
  • Loading branch information
jahooma committed Apr 11, 2023
1 parent 2ba8a59 commit 2c3168e
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 5 deletions.
16 changes: 11 additions & 5 deletions web/components/nav/sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ import { ManifoldLogo } from './manifold-logo'
import { ProfileSummary } from './profile-menu'
import { SearchButton } from './search-button'
import { SidebarItem } from './sidebar-item'
import RectangleGroupIcon from 'web/lib/icons/reactangle-group-icon'

export default function Sidebar(props: {
className?: string
Expand Down Expand Up @@ -132,12 +133,12 @@ const getDesktopNav = (loggedIn: boolean, openDownloadApp: () => void) => {
name: 'Leaderboards',
href: '/leaderboards',
icon: TrophyIcon,
},
{
name: 'Market groups',
icon: RectangleGroupIcon,
href: '/groups',
}
// {
// name: 'Ads',
// icon: SpeakerphoneIcon,
// href: '/ad',
// }
)

return buildArray(
Expand All @@ -164,6 +165,11 @@ const getMobileNav = (toggleModal: () => void) => {
name: `Ads - earn ${formatMoney(5)} per view!`,
icon: SpeakerphoneIcon,
href: '/ad',
},
{
name: 'Market groups',
icon: RectangleGroupIcon,
href: '/groups',
}
)
}
Expand Down
20 changes: 20 additions & 0 deletions web/lib/icons/reactangle-group-icon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
export default function RectangleGroupIcon(
props: React.SVGProps<SVGSVGElement>
) {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 24 24"
strokeWidth={props.strokeWidth || 2}
fill={props.fill || 'none'}
stroke={props.stroke || 'currentColor'}
{...props}
>
<path
strokeLinecap="round"
strokeLinejoin="round"
d="M2.25 7.125C2.25 6.504 2.754 6 3.375 6h6c.621 0 1.125.504 1.125 1.125v3.75c0 .621-.504 1.125-1.125 1.125h-6a1.125 1.125 0 01-1.125-1.125v-3.75zM14.25 8.625c0-.621.504-1.125 1.125-1.125h5.25c.621 0 1.125.504 1.125 1.125v8.25c0 .621-.504 1.125-1.125 1.125h-5.25a1.125 1.125 0 01-1.125-1.125v-8.25zM3.75 16.125c0-.621.504-1.125 1.125-1.125h5.25c.621 0 1.125.504 1.125 1.125v2.25c0 .621-.504 1.125-1.125 1.125h-5.25a1.125 1.125 0 01-1.125-1.125v-2.25z"
/>
</svg>
)
}

0 comments on commit 2c3168e

Please sign in to comment.