Make embedded market link a clickable link
This commit is contained in:
parent
ee6f91a52f
commit
cc15eb2044
|
@ -3,7 +3,7 @@ import Link from 'next/link'
|
||||||
|
|
||||||
export const SiteLink = (props: {
|
export const SiteLink = (props: {
|
||||||
href: string
|
href: string
|
||||||
children: any
|
children?: any
|
||||||
className?: string
|
className?: string
|
||||||
}) => {
|
}) => {
|
||||||
const { href, children, className } = props
|
const { href, children, className } = props
|
||||||
|
|
|
@ -5,6 +5,7 @@ import {
|
||||||
FreeResponse,
|
FreeResponse,
|
||||||
FullContract,
|
FullContract,
|
||||||
} from '../../../../common/contract'
|
} from '../../../../common/contract'
|
||||||
|
import { DOMAIN } from '../../../../common/envs/constants'
|
||||||
import { AnswersGraph } from '../../../components/answers/answers-graph'
|
import { AnswersGraph } from '../../../components/answers/answers-graph'
|
||||||
import {
|
import {
|
||||||
ResolutionOrChance,
|
ResolutionOrChance,
|
||||||
|
@ -15,10 +16,14 @@ import { Col } from '../../../components/layout/col'
|
||||||
import { Row } from '../../../components/layout/row'
|
import { Row } from '../../../components/layout/row'
|
||||||
import { Spacer } from '../../../components/layout/spacer'
|
import { Spacer } from '../../../components/layout/spacer'
|
||||||
import { Linkify } from '../../../components/linkify'
|
import { Linkify } from '../../../components/linkify'
|
||||||
|
import { SiteLink } from '../../../components/site-link'
|
||||||
import { useContractWithPreload } from '../../../hooks/use-contract'
|
import { useContractWithPreload } from '../../../hooks/use-contract'
|
||||||
import { fromPropz, usePropz } from '../../../hooks/use-propz'
|
import { fromPropz, usePropz } from '../../../hooks/use-propz'
|
||||||
import { listAllBets } from '../../../lib/firebase/bets'
|
import { listAllBets } from '../../../lib/firebase/bets'
|
||||||
import { getContractFromSlug } from '../../../lib/firebase/contracts'
|
import {
|
||||||
|
contractPath,
|
||||||
|
getContractFromSlug,
|
||||||
|
} from '../../../lib/firebase/contracts'
|
||||||
import Custom404 from '../../404'
|
import Custom404 from '../../404'
|
||||||
|
|
||||||
export const getStaticProps = fromPropz(getStaticPropz)
|
export const getStaticProps = fromPropz(getStaticPropz)
|
||||||
|
@ -78,8 +83,15 @@ function ContractEmbed(props: { contract: Contract; bets: Bet[] }) {
|
||||||
|
|
||||||
const isBinary = outcomeType === 'BINARY'
|
const isBinary = outcomeType === 'BINARY'
|
||||||
|
|
||||||
|
const href = `https://${DOMAIN}${contractPath(contract)}`
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Col className="w-full flex-1 bg-white py-2">
|
<Col className="w-full flex-1 bg-white py-2 relative">
|
||||||
|
<SiteLink
|
||||||
|
className="absolute top-0 left-0 w-full h-full z-20"
|
||||||
|
href={href}
|
||||||
|
/>
|
||||||
|
|
||||||
<div className="px-3 text-xl md:text-2xl text-indigo-700">
|
<div className="px-3 text-xl md:text-2xl text-indigo-700">
|
||||||
<Linkify text={question} />
|
<Linkify text={question} />
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user