diff --git a/dev.sh b/dev.sh index ca3246ac..d392646e 100755 --- a/dev.sh +++ b/dev.sh @@ -24,7 +24,7 @@ then npx concurrently \ -n FIRESTORE,FUNCTIONS,NEXT,TS \ -c green,white,magenta,cyan \ - "yarn --cwd=functions firestore" \ + "yarn --cwd=functions localDbScript" \ "cross-env FIRESTORE_EMULATOR_HOST=localhost:8080 yarn --cwd=functions dev" \ "cross-env NEXT_PUBLIC_FUNCTIONS_URL=http://localhost:8088 \ NEXT_PUBLIC_FIREBASE_EMULATE=TRUE \ diff --git a/functions/package.json b/functions/package.json index 63ef9b5d..c8f295fc 100644 --- a/functions/package.json +++ b/functions/package.json @@ -13,7 +13,7 @@ "deploy": "firebase deploy --only functions", "logs": "firebase functions:log", "dev": "nodemon src/serve.ts", - "firestore": "firebase emulators:start --only firestore --import=./firestore_export", + "localDbScript": "firebase emulators:start --only functions,firestore,pubsub --import=./firestore_export", "serve": "firebase use dev && yarn build && firebase emulators:start --only functions,firestore,pubsub --import=./firestore_export", "db:update-local-from-remote": "yarn db:backup-remote && gsutil rsync -r gs://$npm_package_config_firestore/firestore_export ./firestore_export", "db:backup-local": "firebase emulators:export --force ./firestore_export", diff --git a/functions/src/on-create-answer.ts b/functions/src/on-create-answer.ts index 1f08ca16..611bf23b 100644 --- a/functions/src/on-create-answer.ts +++ b/functions/src/on-create-answer.ts @@ -2,7 +2,6 @@ import * as functions from 'firebase-functions' import { getContract, getUser } from './utils' import { createCommentOrAnswerOrUpdatedContractNotification } from './create-notification' import { Answer } from '../../common/answer' -import { addUserToContractFollowers } from './follow-market' export const onCreateAnswer = functions.firestore .document('contracts/{contractId}/answers/{answerNumber}') @@ -21,7 +20,6 @@ export const onCreateAnswer = functions.firestore const answerCreator = await getUser(answer.userId) if (!answerCreator) throw new Error('Could not find answer creator') - await addUserToContractFollowers(contract.id, answerCreator.id) await createCommentOrAnswerOrUpdatedContractNotification( answer.id, 'answer', diff --git a/web/components/contract/contract-overview.tsx b/web/components/contract/contract-overview.tsx index cf6e135e..2aa2d6df 100644 --- a/web/components/contract/contract-overview.tsx +++ b/web/components/contract/contract-overview.tsx @@ -45,6 +45,13 @@ export const ContractOverview = (props: {
+ {(outcomeType === 'FREE_RESPONSE' || + outcomeType === 'MULTIPLE_CHOICE') && + !resolution && ( +
+ +
+ )} @@ -85,12 +92,10 @@ export const ContractOverview = (props: { ) : isPseudoNumeric ? ( - {tradingAllowed(contract) && } - - ) : isPseudoNumeric ? ( - - - {tradingAllowed(contract) && } + + + {tradingAllowed(contract) && } + ) : ( (outcomeType === 'FREE_RESPONSE' ||