diff --git a/web/components/contract/contract-card.tsx b/web/components/contract/contract-card.tsx index eecfa63d..a8caf7bd 100644 --- a/web/components/contract/contract-card.tsx +++ b/web/components/contract/contract-card.tsx @@ -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'} /> )} diff --git a/web/pages/embed/[username]/[contractSlug].tsx b/web/pages/embed/[username]/[contractSlug].tsx index 70148afe..13480998 100644 --- a/web/pages/embed/[username]/[contractSlug].tsx +++ b/web/pages/embed/[username]/[contractSlug].tsx @@ -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 ( <>