From 2a08f70a9f305f528585a3507851d7e5e98d13ec Mon Sep 17 00:00:00 2001 From: mantikoros Date: Wed, 15 Dec 2021 23:56:12 -0600 Subject: [PATCH] contractid: reenable stuff --- web/pages/[username]/[contractId].tsx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/web/pages/[username]/[contractId].tsx b/web/pages/[username]/[contractId].tsx index 2e93a4cc..da26dbec 100644 --- a/web/pages/[username]/[contractId].tsx +++ b/web/pages/[username]/[contractId].tsx @@ -14,7 +14,7 @@ import { Contract, getContract } from '../../lib/firebase/contracts' export async function getServerSideProps({ params }: { params: any }) { const contract = await getContract(params.contractId) - // console.log('params', params, 'contract', contract) + console.log('params', params, 'contract', contract) return { props: { @@ -31,7 +31,7 @@ export async function getServerSideProps({ params }: { params: any }) { // } export default function ContractPage({ contract }: { contract: Contract }) { - const user = null // useUser() + const user = useUser() // const router = useRouter() // const { contractId } = router.query as { contractId: string } @@ -49,9 +49,7 @@ export default function ContractPage({ contract }: { contract: Contract }) { if (!contract) return
const { creatorId, isResolved } = contract - // const isCreator = user?.id === creatorId - - const isCreator = false + const isCreator = user?.id === creatorId return (