contractid: reenable stuff

This commit is contained in:
mantikoros 2021-12-15 23:56:12 -06:00
parent 24dabe09fa
commit 2a08f70a9f

View File

@ -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 <div />
const { creatorId, isResolved } = contract
// const isCreator = user?.id === creatorId
const isCreator = false
const isCreator = user?.id === creatorId
return (
<Col className="max-w-7xl mx-auto sm:px-6 lg:px-8">