This commit is contained in:
mantikoros 2021-12-15 22:10:14 -06:00
parent 3691ef81ed
commit 09ad6a3fe0
2 changed files with 32 additions and 30 deletions

View File

@ -31,11 +31,10 @@ export async function getServerSideProps({ params }: { params: any }) {
// } // }
export default function ContractPage({ contract }: { contract: Contract }) { export default function ContractPage({ contract }: { contract: Contract }) {
const user = useUser() const user = null // useUser()
const router = useRouter()
const { contractId } = router.query as { contractId: string }
// const router = useRouter()
// const { contractId } = router.query as { contractId: string }
// const contract = useContract(contractId) // const contract = useContract(contractId)
// if (contract === 'loading') { // if (contract === 'loading') {
// return <div /> // return <div />
@ -53,7 +52,7 @@ export default function ContractPage({ contract }: { contract: Contract }) {
const isCreator = user?.id === creatorId const isCreator = user?.id === creatorId
return ( return (
<Col className="max-w-7xl mx-auto sm:px-6 lg:px-8"> <>
<Head> <Head>
<title>{contract.question}</title> <title>{contract.question}</title>
@ -71,33 +70,35 @@ export default function ContractPage({ contract }: { contract: Contract }) {
/> />
</Head> </Head>
<Header /> <Col className="max-w-7xl mx-auto sm:px-6 lg:px-8">
<Header />
<Col <Col
className={clsx( className={clsx(
'w-full items-start md:flex-row mt-4', 'w-full items-start md:flex-row mt-4',
isResolved ? 'md:justify-center' : 'md:justify-between' isResolved ? 'md:justify-center' : 'md:justify-between'
)} )}
> >
<ContractOverview <ContractOverview
contract={contract} contract={contract}
className="max-w-4xl w-full p-4" className="max-w-4xl w-full p-4"
/> />
{!isResolved && ( {!isResolved && (
<> <>
<div className="mt-12 md:mt-0 md:ml-8" /> <div className="mt-12 md:mt-0 md:ml-8" />
<Col className="w-full sm:w-auto sm:self-center"> <Col className="w-full sm:w-auto sm:self-center">
<BetPanel contract={contract} /> <BetPanel contract={contract} />
{isCreator && ( {isCreator && (
<ResolutionPanel creator={user} contract={contract} /> <ResolutionPanel creator={user} contract={contract} />
)} )}
</Col> </Col>
</> </>
)} )}
</Col>
</Col> </Col>
</Col> </>
) )
} }

View File

@ -3,7 +3,8 @@ import { Html, Head, Main, NextScript } from 'next/document'
export default function Document() { export default function Document() {
return ( return (
<Html data-theme="mantic" className="min-h-screen"> <Html data-theme="mantic" className="min-h-screen">
<Head> <Head />
{/* <Head>
<title>Mantic Markets</title> <title>Mantic Markets</title>
<meta <meta
@ -57,7 +58,7 @@ export default function Document() {
`, `,
}} }}
/> />
</Head> </Head> */}
<body className="min-h-screen font-readex-pro bg-base-200"> <body className="min-h-screen font-readex-pro bg-base-200">
<Main /> <Main />
<NextScript /> <NextScript />