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