Open embed card clicks in new tab
This commit is contained in:
parent
8484fcd54e
commit
1a93611aa0
|
@ -46,6 +46,7 @@ export function ContractCard(props: {
|
|||
hideGroupLink?: boolean
|
||||
trackingPostfix?: string
|
||||
noLinkAvatar?: boolean
|
||||
newTab?: boolean
|
||||
}) {
|
||||
const {
|
||||
showTime,
|
||||
|
@ -56,6 +57,7 @@ export function ContractCard(props: {
|
|||
hideGroupLink,
|
||||
trackingPostfix,
|
||||
noLinkAvatar,
|
||||
newTab,
|
||||
} = props
|
||||
const contract = useContractWithPreload(props.contract) ?? props.contract
|
||||
const { question, outcomeType } = contract
|
||||
|
@ -189,6 +191,7 @@ export function ContractCard(props: {
|
|||
}
|
||||
)}
|
||||
className="absolute top-0 left-0 right-0 bottom-0"
|
||||
target={newTab ? '_blank' : '_self'}
|
||||
/>
|
||||
</Link>
|
||||
)}
|
||||
|
|
|
@ -28,7 +28,6 @@ import {
|
|||
tradingAllowed,
|
||||
} from 'web/lib/firebase/contracts'
|
||||
import Custom404 from '../../404'
|
||||
import { useWindowSize } from 'web/hooks/use-window-size'
|
||||
|
||||
export const getStaticProps = fromPropz(getStaticPropz)
|
||||
export async function getStaticPropz(props: {
|
||||
|
@ -83,7 +82,12 @@ export function ContractEmbed(props: EmbedProps) {
|
|||
return (
|
||||
<>
|
||||
<div className="contents [@media(min-height:250px)]:hidden">
|
||||
<ContractCard contract={contract} className="h-screen" />
|
||||
<ContractCard
|
||||
contract={contract}
|
||||
className="h-screen"
|
||||
noLinkAvatar
|
||||
newTab
|
||||
/>
|
||||
</div>
|
||||
<div className="hidden [@media(min-height:250px)]:contents">
|
||||
<ContractSmolView {...props} />
|
||||
|
|
Loading…
Reference in New Issue
Block a user