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

View File

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