test
This commit is contained in:
parent
9bd0ad7211
commit
318e22b97d
|
@ -13,8 +13,8 @@ import { ResolutionPanel } from '../../components/resolution-panel'
|
||||||
import { Contract, getContract } from '../../lib/firebase/contracts'
|
import { Contract, getContract } from '../../lib/firebase/contracts'
|
||||||
|
|
||||||
export async function getServerSideProps({ params }: { params: any }) {
|
export async function getServerSideProps({ params }: { params: any }) {
|
||||||
console.log('params', params)
|
|
||||||
const contract = await getContract(params.contractId)
|
const contract = await getContract(params.contractId)
|
||||||
|
// console.log('params', params, 'contract', contract)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
props: {
|
props: {
|
||||||
|
@ -54,10 +54,9 @@ export default function ContractPage({ contract }: { contract: Contract }) {
|
||||||
const isCreator = false
|
const isCreator = false
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<Col className="max-w-7xl mx-auto sm:px-6 lg:px-8">
|
||||||
<Head>
|
<Head>
|
||||||
<title>{contract.question}</title>
|
<title>{contract.question} | Mantic Markets</title>
|
||||||
|
|
||||||
<meta
|
<meta
|
||||||
property="og:title"
|
property="og:title"
|
||||||
name="twitter:title"
|
name="twitter:title"
|
||||||
|
@ -72,35 +71,33 @@ export default function ContractPage({ contract }: { contract: Contract }) {
|
||||||
/>
|
/>
|
||||||
</Head>
|
</Head>
|
||||||
|
|
||||||
<Col className="max-w-7xl mx-auto sm:px-6 lg:px-8">
|
<Header />
|
||||||
<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 && user && (
|
{isCreator && user && (
|
||||||
<ResolutionPanel creator={user} contract={contract} />
|
<ResolutionPanel creator={user} contract={contract} />
|
||||||
)}
|
)}
|
||||||
</Col>
|
</Col>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</Col>
|
|
||||||
</Col>
|
</Col>
|
||||||
</>
|
</Col>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,41 @@
|
||||||
import 'tailwindcss/tailwind.css'
|
import 'tailwindcss/tailwind.css'
|
||||||
import type { AppProps } from 'next/app'
|
import type { AppProps } from 'next/app'
|
||||||
|
import Head from 'next/head'
|
||||||
|
|
||||||
function MyApp({ Component, pageProps }: AppProps) {
|
function MyApp({ Component, pageProps }: AppProps) {
|
||||||
return <Component {...pageProps} />
|
return (
|
||||||
|
<>
|
||||||
|
<Head>
|
||||||
|
<title>Mantic Markets</title>
|
||||||
|
|
||||||
|
<meta
|
||||||
|
property="og:title"
|
||||||
|
name="twitter:title"
|
||||||
|
content="Mantic Markets"
|
||||||
|
key="title"
|
||||||
|
/>
|
||||||
|
<meta
|
||||||
|
name="description"
|
||||||
|
content="Mantic Markets is creating better forecasting through user-created prediction markets."
|
||||||
|
/>
|
||||||
|
<meta
|
||||||
|
property="og:description"
|
||||||
|
name="twitter:description"
|
||||||
|
content="Mantic Markets is creating better forecasting through user-created prediction markets."
|
||||||
|
/>
|
||||||
|
<meta property="og:url" content="https://mantic.markets" />
|
||||||
|
<meta name="twitter:card" content="summary_large_image" />
|
||||||
|
<meta name="twitter:site" content="@manticmarkets" />
|
||||||
|
<meta
|
||||||
|
property="og:image"
|
||||||
|
name="twitter:image"
|
||||||
|
content="https://mantic.markets/logo-cover.png"
|
||||||
|
/>
|
||||||
|
</Head>
|
||||||
|
|
||||||
|
<Component {...pageProps} />
|
||||||
|
</>
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
export default MyApp
|
export default MyApp
|
||||||
|
|
|
@ -3,34 +3,7 @@ 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>
|
|
||||||
|
|
||||||
<meta
|
|
||||||
property="og:title"
|
|
||||||
name="twitter:title"
|
|
||||||
content="Mantic Markets"
|
|
||||||
key="title"
|
|
||||||
/>
|
|
||||||
<meta
|
|
||||||
name="description"
|
|
||||||
content="Mantic Markets is creating better forecasting through user-created prediction markets."
|
|
||||||
/>
|
|
||||||
<meta
|
|
||||||
property="og:description"
|
|
||||||
name="twitter:description"
|
|
||||||
content="Mantic Markets is creating better forecasting through user-created prediction markets."
|
|
||||||
/>
|
|
||||||
<meta property="og:url" content="https://mantic.markets" />
|
|
||||||
<meta name="twitter:card" content="summary_large_image" />
|
|
||||||
<meta name="twitter:site" content="@manticmarkets" />
|
|
||||||
<meta
|
|
||||||
property="og:image"
|
|
||||||
name="twitter:image"
|
|
||||||
content="https://mantic.markets/logo-cover.png"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<link rel="icon" href="/favicon.ico" />
|
<link rel="icon" href="/favicon.ico" />
|
||||||
|
|
||||||
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
||||||
|
@ -58,7 +31,8 @@ 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 />
|
||||||
|
|
Loading…
Reference in New Issue
Block a user