diff --git a/web/components/contract/contract-info-dialog.tsx b/web/components/contract/contract-info-dialog.tsx index 168ada50..9cb28744 100644 --- a/web/components/contract/contract-info-dialog.tsx +++ b/web/components/contract/contract-info-dialog.tsx @@ -13,6 +13,8 @@ import { Col } from '../layout/col' import { Modal } from '../layout/modal' import { Title } from '../title' import { InfoTooltip } from '../info-tooltip' +import { useUser } from 'web/hooks/use-user' +import { ENV_CONFIG } from 'common/envs/constants' export const contractDetailsButtonClassName = 'group flex items-center rounded-md px-3 py-2 text-sm font-medium cursor-pointer hover:bg-gray-100 text-gray-400 hover:text-gray-500' @@ -20,6 +22,8 @@ export const contractDetailsButtonClassName = export function ContractInfoDialog(props: { contract: Contract; bets: Bet[] }) { const { contract, bets } = props + const user = useUser() + const [open, setOpen] = useState(false) const formatTime = (dt: number) => dayjs(dt).format('MMM DD, YYYY hh:mm a z') @@ -124,9 +128,11 @@ export function ContractInfoDialog(props: { contract: Contract; bets: Bet[] }) { - {contract.mechanism === 'cpmm-1' && !contract.resolution && ( - - )} + {contract.mechanism === 'cpmm-1' && + !contract.resolution && + ENV_CONFIG.whitelistCreators?.includes(user?.username ?? '') && ( + + )}