Stop link click propogation

This commit is contained in:
jahooma 2021-12-16 15:28:56 -06:00
parent 4503a5e04a
commit 06f1657a4c
2 changed files with 6 additions and 2 deletions

View File

@ -78,7 +78,7 @@ export function BetsList(props: { user: User }) {
<MyContractBets
key={contract.id}
contract={contract}
bets={contractBets[contract.id]}
bets={contractBets[contract.id] ?? []}
/>
))}
</Col>
@ -104,7 +104,10 @@ function MyContractBets(props: { contract: Contract; bets: Bet[] }) {
<Col className="flex-[2] gap-1">
<div>
<Link href={path(contract)}>
<a className="font-medium text-indigo-700 hover:underline hover:decoration-indigo-400 hover:decoration-2">
<a
className="font-medium text-indigo-700 hover:underline hover:decoration-indigo-400 hover:decoration-2"
onClick={(e) => e.stopPropagation()}
>
{contract.question}
</a>
</Link>

View File

@ -22,6 +22,7 @@ export function UserLink(props: { displayName: string; className?: string }) {
'hover:underline hover:decoration-indigo-400 hover:decoration-2',
className
)}
onClick={(e) => e.stopPropagation()}
>
@{username}
</a>