Move market creation to /create

This commit is contained in:
Austin Chen 2021-12-15 18:31:14 -08:00
parent 83b4cc38b3
commit 79c0685b30
3 changed files with 10 additions and 52 deletions

View File

@ -25,7 +25,7 @@ function SignInLink(props: { darkBackground?: boolean }) {
<>
{user ? (
<>
<Link href="/contract">
<Link href="/create">
<a className={clsx('text-base font-medium', themeClasses)}>
Create a market
</a>
@ -37,22 +37,9 @@ function SignInLink(props: { darkBackground?: boolean }) {
</a>
</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>
</>*/
}
) : (
<></>
)}
</>
)
}

View File

@ -1,12 +1,12 @@
import router from 'next/router'
import { useState } from 'react'
import { ContractsList } from '../../components/contracts-list'
import { Header } from '../../components/header'
import { Spacer } from '../../components/layout/spacer'
import { Title } from '../../components/title'
import { useUser } from '../../hooks/use-user'
import { createContract } from '../../lib/service/create-contract'
import { ContractsList } from '../components/contracts-list'
import { Header } from '../components/header'
import { Spacer } from '../components/layout/spacer'
import { Title } from '../components/title'
import { useUser } from '../hooks/use-user'
import { createContract } from '../lib/service/create-contract'
// Allow user to create a new contract
export default function NewContract() {

View File

@ -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>
)
}