diff --git a/web/components/liquidity-panel.tsx b/web/components/liquidity-panel.tsx
index 58f57a8a..7e216be5 100644
--- a/web/components/liquidity-panel.tsx
+++ b/web/components/liquidity-panel.tsx
@@ -14,6 +14,8 @@ import { Col } from './layout/col'
import { track } from 'web/lib/service/analytics'
import { InfoTooltip } from './info-tooltip'
import { BETTORS, PRESENT_BET } from 'common/user'
+import { buildArray } from 'common/util/array'
+import { useAdmin } from 'web/hooks/use-admin'
export function LiquidityPanel(props: { contract: CPMMContract }) {
const { contract } = props
@@ -28,31 +30,32 @@ export function LiquidityPanel(props: { contract: CPMMContract }) {
setShowWithdrawal(true)
}, [showWithdrawal, lpShares])
+ const isCreator = user?.id === contract.creatorId
+ const isAdmin = useAdmin()
+
+ if (!showWithdrawal && !isAdmin && !isCreator) return <>>
+
return (
,
},
- ...(showWithdrawal
- ? [
- {
- title: 'Withdraw',
- content: (
-
- ),
- },
- ]
- : []),
+ showWithdrawal && {
+ title: 'Withdraw',
+ content: (
+
+ ),
+ },
{
title: 'Pool',
content: ,
- },
- ]}
+ }
+ )}
/>
)
}