import clsx from 'clsx' import dayjs from 'dayjs' import { useRouter } from 'next/router' import React from 'react' import { Contract, deleteContract } from '../lib/firebase/contracts' import { formatMoney } from '../lib/util/format' import { Col } from './layout/col' import { Spacer } from './layout/spacer' export function ResolvedPanel(props: { contract: Contract className?: string }) { const router = useRouter() const { contract, className } = props const { resolution, resolutionTime, pot, seedAmounts } = contract const total = pot.YES + pot.NO - seedAmounts.YES - seedAmounts.NO const color = resolution === 'YES' ? 'text-primary' : resolution === 'NO' ? 'text-red-400' : resolution === 'CANCEL' ? 'text-yellow-400' : 'text-gray-500' return (