diff --git a/web/components/bets-list.tsx b/web/components/bets-list.tsx
index 9ec28b14..6508e2fb 100644
--- a/web/components/bets-list.tsx
+++ b/web/components/bets-list.tsx
@@ -48,6 +48,8 @@ import {
import { useTimeSinceFirstRender } from 'web/hooks/use-time-since-first-render'
import { trackLatency } from 'web/lib/firebase/tracking'
import { NumericContract } from 'common/contract'
+import { useUser } from 'web/hooks/use-user'
+import { SellSharesModal } from './sell-modal'
type BetSort = 'newest' | 'profit' | 'closeTime' | 'value'
type BetFilter = 'open' | 'sold' | 'closed' | 'resolved' | 'all'
@@ -257,12 +259,14 @@ function MyContractBets(props: {
setCollapsed((collapsed) => !collapsed)}
>
-
+ setCollapsed((collapsed) => !collapsed)}
+ >
@@ -360,10 +364,11 @@ export function MyBetsSummary(props: {
const noWinnings = sumBy(excludeSalesAndAntes, (bet) =>
calculatePayout(contract, bet, 'NO')
)
- const { invested, profitPercent, payout, profit } = getContractBetMetrics(
- contract,
- bets
- )
+ const { invested, profitPercent, payout, profit, totalShares } =
+ getContractBetMetrics(contract, bets)
+
+ const [showSellModal, setShowSellModal] = useState(false)
+ const user = useUser()
return (
@@ -419,6 +424,26 @@ export function MyBetsSummary(props: {
Profit
{formatMoney(profit)}
+ {isCpmm && isBinary && !resolution && invested > 0 && user && (
+ <>
+
+ {showSellModal && (
+
+ )}
+ >
+ )}