Add tournaments to sidebar (#802)

* Add tournaments to sidebar

* Remove unused import

* Reposition tournaments tab

Co-authored-by: Austin Chen <akrolsmir@gmail.com>
This commit is contained in:
Sinclair Chen 2022-08-26 10:45:01 -07:00 committed by GitHub
parent 803091db06
commit 490115d890
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 38 additions and 18 deletions

View File

@ -6,7 +6,6 @@ import {
CashIcon,
HeartIcon,
UserGroupIcon,
TrendingUpIcon,
ChatIcon,
} from '@heroicons/react/outline'
import clsx from 'clsx'
@ -29,6 +28,7 @@ import { Spacer } from '../layout/spacer'
import { useWindowSize } from 'web/hooks/use-window-size'
import { CHALLENGES_ENABLED } from 'common/challenge'
import { buildArray } from 'common/util/array'
import TrophyIcon from 'web/lib/icons/trophy-icon'
const logout = async () => {
// log out, and then reload the page, in case SSR wants to boot them out
@ -46,11 +46,12 @@ function getNavigation() {
icon: NotificationsIcon,
},
{ name: 'Leaderboards', href: '/leaderboards', icon: TrendingUpIcon },
...(IS_PRIVATE_MANIFOLD
? []
: [{ name: 'Get M$', href: '/add-funds', icon: CashIcon }]),
: [
{ name: 'Get M$', href: '/add-funds', icon: CashIcon },
{ name: 'Tournaments', href: '/tournaments', icon: TrophyIcon },
]),
]
}
@ -70,11 +71,9 @@ function getMoreNavigation(user?: User | null) {
return buildArray(
CHALLENGES_ENABLED && { name: 'Challenges', href: '/challenges' },
[
{ name: 'Leaderboards', href: '/leaderboards' },
{ name: 'Tournaments', href: '/tournaments' },
{ name: 'Charity', href: '/charity' },
{
name: 'Salem tournament',
href: 'https://salemcenter.manifold.markets/',
},
{ name: 'Blog', href: 'https://news.manifold.markets' },
{ name: 'Discord', href: 'https://discord.gg/eHQBNBqXuh' },
{ name: 'Twitter', href: 'https://twitter.com/ManifoldMarkets' },
@ -86,12 +85,9 @@ function getMoreNavigation(user?: User | null) {
CHALLENGES_ENABLED && { name: 'Challenges', href: '/challenges' },
[
{ name: 'Referrals', href: '/referrals' },
{ name: 'Leaderboards', href: '/leaderboards' },
{ name: 'Charity', href: '/charity' },
{ name: 'Send M$', href: '/links' },
{
name: 'Salem tournament',
href: 'https://salemcenter.manifold.markets/',
},
{ name: 'Discord', href: 'https://discord.gg/eHQBNBqXuh' },
{ name: 'Help & About', href: 'https://help.manifold.markets/' },
{
@ -120,12 +116,12 @@ const signedOutMobileNavigation = [
icon: BookOpenIcon,
},
{ name: 'Charity', href: '/charity', icon: HeartIcon },
{ name: 'Leaderboards', href: '/leaderboards', icon: TrendingUpIcon },
{ name: 'Tournaments', href: '/tournaments', icon: TrophyIcon },
{ name: 'Discord', href: 'https://discord.gg/eHQBNBqXuh', icon: ChatIcon },
]
const signedInMobileNavigation = [
{ name: 'Leaderboards', href: '/leaderboards', icon: TrendingUpIcon },
{ name: 'Tournaments', href: '/tournaments', icon: TrophyIcon },
...(IS_PRIVATE_MANIFOLD
? []
: [{ name: 'Get M$', href: '/add-funds', icon: CashIcon }]),
@ -148,10 +144,7 @@ function getMoreMobileNav() {
CHALLENGES_ENABLED && { name: 'Challenges', href: '/challenges' },
[
{ name: 'Referrals', href: '/referrals' },
{
name: 'Salem tournament',
href: 'https://salemcenter.manifold.markets/',
},
{ name: 'Leaderboards', href: '/leaderboards' },
{ name: 'Charity', href: '/charity' },
{ name: 'Send M$', href: '/links' },
{ name: 'Discord', href: 'https://discord.gg/eHQBNBqXuh' },

View File

@ -0,0 +1,27 @@
export default function TrophyIcon(props: React.SVGProps<SVGSVGElement>) {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 24 24"
stroke="currentcolor"
stroke-width="2"
{...props}
>
<g>
<path
d="m6,5c0,4 1.4,7.8 3.5,8.5l0,2c-1.2,0.7 -1.2,1 -1.6,4l8,0c-0.4,-3 -0.4,-3.3 -1.6,-4l0,-2c2.1,-0.7 3.5,-4.5 3.5,-8.5z"
stroke-linejoin="round"
fill="none"
/>
<path
d="m6.2,8.3c-2.5,-1.6 -3.5,1 -3,2.5c1,1.7 2.6,2.5 4.5,1.8"
fill="none"
/>
<path
d="m17.6,8.3c2.5,-1.6 3.5,1 3,2.5c-1,1.7 -2.6,2.5 -4.5,1.8"
fill="none"
/>
</g>
</svg>
)
}