import { useRouter } from 'next/router' import { useContract } from '../../hooks/use-contract' import { useUser } from '../../hooks/use-user' export default function ContractPage() { const user = useUser() const router = useRouter() const { contractId } = router.query as { contractId: string } const contract = useContract(contractId) if (contract === 'loading') { return
Loading...
} if (contract === null) { return
Contract not found...
} return (
{contract.id}
{contract.question}
) }