From 5c7a8e52c9b5a0faf17137bb23e19b8a0ca82957 Mon Sep 17 00:00:00 2001 From: jahooma Date: Tue, 14 Dec 2021 01:05:33 -0600 Subject: [PATCH] Fix type errors --- web/lib/service/create-contract.ts | 1 + web/pages/account.tsx | 11 +---------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/web/lib/service/create-contract.ts b/web/lib/service/create-contract.ts index 55221e61..82c26a19 100644 --- a/web/lib/service/create-contract.ts +++ b/web/lib/service/create-contract.ts @@ -27,6 +27,7 @@ export async function createContract(question: string, description: string, init seedAmounts: { YES: seedYes, NO: seedNo }, pot: { YES: seedYes, NO: seedNo }, + isResolved: false, // TODO: Set create time to Firestore timestamp createdTime: Date.now(), diff --git a/web/pages/account.tsx b/web/pages/account.tsx index 4019c33e..9e15effc 100644 --- a/web/pages/account.tsx +++ b/web/pages/account.tsx @@ -1,8 +1,6 @@ import { firebaseLogin, firebaseLogout, User } from '../lib/firebase/users' import { Header } from '../components/header' import { useUser } from '../hooks/use-user' -import { useState, useEffect } from 'react' -import { Contract, listContracts } from '../lib/firebase/contracts' import { ContractsList } from '../components/contracts-list' import { Title } from '../components/title' import { Row } from '../components/layout/row' @@ -60,13 +58,6 @@ function SignInCard() { export default function Account() { const user = useUser() - const [contracts, setContracts] = useState([]) - useEffect(() => { - console.log('Fetching contracts', user?.id) - if (user?.id) { - listContracts(user?.id).then(setContracts) - } - }, [user?.id]) return (
@@ -76,7 +67,7 @@ export default function Account() {
- <ContractsList contracts={contracts} /> + <ContractsList /> </div> ) : ( <SignInCard />