Move market creation to /create
				
					
				
			This commit is contained in:
		
							parent
							
								
									83b4cc38b3
								
							
						
					
					
						commit
						79c0685b30
					
				|  | @ -25,7 +25,7 @@ function SignInLink(props: { darkBackground?: boolean }) { | ||||||
|     <> |     <> | ||||||
|       {user ? ( |       {user ? ( | ||||||
|         <> |         <> | ||||||
|           <Link href="/contract"> |           <Link href="/create"> | ||||||
|             <a className={clsx('text-base font-medium', themeClasses)}> |             <a className={clsx('text-base font-medium', themeClasses)}> | ||||||
|               Create a market |               Create a market | ||||||
|             </a> |             </a> | ||||||
|  | @ -37,22 +37,9 @@ function SignInLink(props: { darkBackground?: boolean }) { | ||||||
|             </a> |             </a> | ||||||
|           </Link> |           </Link> | ||||||
|         </> |         </> | ||||||
|       ) : <></> /*( |       ) : ( | ||||||
|         <> |         <></> | ||||||
|           <Link href="/markets"> |       )} | ||||||
|             <a className={clsx('text-base font-medium', themeClasses)}> |  | ||||||
|               All markets |  | ||||||
|             </a> |  | ||||||
|           </Link> |  | ||||||
| 
 |  | ||||||
|           <button |  | ||||||
|             className={clsx('text-base font-medium', themeClasses)} |  | ||||||
|             onClick={() => firebaseLogin()} |  | ||||||
|           > |  | ||||||
|             Sign in |  | ||||||
|           </button> |  | ||||||
|         </>*/ |  | ||||||
|       } |  | ||||||
|     </> |     </> | ||||||
|   ) |   ) | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -1,12 +1,12 @@ | ||||||
| import router from 'next/router' | import router from 'next/router' | ||||||
| import { useState } from 'react' | import { useState } from 'react' | ||||||
| 
 | 
 | ||||||
| import { ContractsList } from '../../components/contracts-list' | import { ContractsList } from '../components/contracts-list' | ||||||
| import { Header } from '../../components/header' | import { Header } from '../components/header' | ||||||
| import { Spacer } from '../../components/layout/spacer' | import { Spacer } from '../components/layout/spacer' | ||||||
| import { Title } from '../../components/title' | import { Title } from '../components/title' | ||||||
| import { useUser } from '../../hooks/use-user' | import { useUser } from '../hooks/use-user' | ||||||
| import { createContract } from '../../lib/service/create-contract' | import { createContract } from '../lib/service/create-contract' | ||||||
| 
 | 
 | ||||||
| // Allow user to create a new contract
 | // Allow user to create a new contract
 | ||||||
| export default function NewContract() { | export default function NewContract() { | ||||||
|  | @ -1,29 +0,0 @@ | ||||||
| import React from 'react' |  | ||||||
| import { Header } from '../components/header' |  | ||||||
| import { Col } from '../components/layout/col' |  | ||||||
| import { useUser } from '../hooks/use-user' |  | ||||||
| import { useUserBets } from '../hooks/use-user-bets' |  | ||||||
| 
 |  | ||||||
| export default function MyBets() { |  | ||||||
|   const user = useUser() |  | ||||||
| 
 |  | ||||||
|   const bets = useUserBets(user?.id ?? '') |  | ||||||
| 
 |  | ||||||
|   if (bets === 'loading') { |  | ||||||
|     return <div /> |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   return ( |  | ||||||
|     <div className="max-w-7xl mx-auto sm:px-6 lg:px-8"> |  | ||||||
|       <Header /> |  | ||||||
| 
 |  | ||||||
|       <Col className="w-full md:justify-between md:flex-row mt-4"> |  | ||||||
|         {bets.length === 0 ? ( |  | ||||||
|           <div>You have not made any bets yet!</div> |  | ||||||
|         ) : ( |  | ||||||
|           <div>{bets.length}</div> |  | ||||||
|         )} |  | ||||||
|       </Col> |  | ||||||
|     </div> |  | ||||||
|   ) |  | ||||||
| } |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user