diff --git a/web/components/contract/contract-card.tsx b/web/components/contract/contract-card.tsx
index e0f8c040..4881709f 100644
--- a/web/components/contract/contract-card.tsx
+++ b/web/components/contract/contract-card.tsx
@@ -94,7 +94,6 @@ export function ContractCard(props: {
)}
-
)
diff --git a/web/components/contract/quick-bet.tsx b/web/components/contract/quick-bet.tsx
index 6cd62cd1..013c94ea 100644
--- a/web/components/contract/quick-bet.tsx
+++ b/web/components/contract/quick-bet.tsx
@@ -51,24 +51,20 @@ export function QuickBet(props: { contract: Contract }) {
const [upHover, setUpHover] = useState(false)
const [downHover, setDownHover] = useState(false)
- let override
+ let previewProb = undefined
try {
- override = upHover
- ? formatPercent(
- getOutcomeProbabilityAfterBet(
- contract,
- quickOutcome(contract, 'UP') || '',
- 10
- )
+ previewProb = upHover
+ ? getOutcomeProbabilityAfterBet(
+ contract,
+ quickOutcome(contract, 'UP') || '',
+ 10
)
: downHover
- ? formatPercent(
- 1 -
- getOutcomeProbabilityAfterBet(
- contract,
- quickOutcome(contract, 'DOWN') || '',
- 10
- )
+ ? 1 -
+ getOutcomeProbabilityAfterBet(
+ contract,
+ quickOutcome(contract, 'DOWN') || '',
+ 10
)
: undefined
} catch (e) {
@@ -144,7 +140,7 @@ export function QuickBet(props: { contract: Contract }) {
)}
-
+
{/* Down bet triangle */}
@@ -172,10 +168,11 @@ export function QuickBet(props: { contract: Contract }) {
)
}
-export function ProbBar(props: { contract: Contract }) {
- const { contract } = props
+export function ProbBar(props: { contract: Contract; previewProb?: number }) {
+ const { contract, previewProb } = props
+ // TODO: Switch preview color as it changes from green to red
const color = getColor(contract)
- const prob = getProb(contract)
+ const prob = previewProb ?? getProb(contract)
return (
<>
{outcomeType === 'BINARY' && (
@@ -235,6 +234,7 @@ export function QuickOutcomeView(props: {
override={override}
/>
)}
+
>
)
}