From dc51e2cf46b7d5ad870c80fd5aba8e10d2099420 Mon Sep 17 00:00:00 2001 From: James Grugett Date: Sun, 9 Oct 2022 19:11:44 -0500 Subject: [PATCH 1/8] Rename `updateMetrics` to `scheduleUpdateMetrics` --- functions/src/index.ts | 2 +- functions/src/update-metrics.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/functions/src/index.ts b/functions/src/index.ts index 763fd8bb..a6d120c8 100644 --- a/functions/src/index.ts +++ b/functions/src/index.ts @@ -9,7 +9,7 @@ export * from './on-create-user' export * from './on-create-bet' export * from './on-create-comment-on-contract' export * from './on-view' -export { updateMetrics } from './update-metrics' +export { scheduleUpdateMetrics } from './update-metrics' export * from './update-stats' export * from './update-loans' export * from './backup-db' diff --git a/functions/src/update-metrics.ts b/functions/src/update-metrics.ts index 4739dcc1..e77ab71f 100644 --- a/functions/src/update-metrics.ts +++ b/functions/src/update-metrics.ts @@ -26,7 +26,7 @@ import { getFunctionUrl } from '../../common/api' const firestore = admin.firestore() -export const updateMetrics = functions.pubsub +export const scheduleUpdateMetrics = functions.pubsub .schedule('every 15 minutes') .onRun(async () => { const response = await fetch(getFunctionUrl('updatemetrics'), { From 8d06e4b4d2f664971fcd45d26ccdf2fea2a265ce Mon Sep 17 00:00:00 2001 From: Sinclair Chen Date: Sun, 9 Oct 2022 19:37:24 -0700 Subject: [PATCH 2/8] refactor text input into one component (#1016) * Add responsive text input component * Add styled expanding textarea component --- web/components/amount-input.tsx | 5 ++-- web/components/answers/answer-item.tsx | 5 ++-- .../answers/create-answer-panel.tsx | 6 ++--- .../answers/multiple-choice-answers.tsx | 6 ++--- .../challenges/create-challenge-modal.tsx | 6 ++--- web/components/contract-search.tsx | 7 +++--- .../contract/contract-description.tsx | 7 +++--- web/components/contract/contract-details.tsx | 9 ++++--- web/components/create-post.tsx | 8 +++--- web/components/expanding-input.tsx | 16 ++++++++++++ web/components/filter-select-users.tsx | 5 ++-- web/components/groups/create-group-button.tsx | 4 +-- web/components/groups/edit-group-button.tsx | 4 +-- web/components/input.tsx | 22 ++++++++++++++++ .../manalinks/create-links-button.tsx | 15 ++++++----- web/components/number-input.tsx | 5 ++-- web/components/probability-input.tsx | 8 +++--- web/components/probability-selector.tsx | 5 ++-- web/pages/charity/index.tsx | 5 ++-- web/pages/contract-search-firestore.tsx | 5 ++-- web/pages/create.tsx | 25 ++++++++----------- web/pages/date-docs/create.tsx | 10 +++----- web/pages/groups.tsx | 9 ++++--- web/pages/home/index.tsx | 5 ++-- web/pages/profile.tsx | 19 ++++++-------- 25 files changed, 128 insertions(+), 93 deletions(-) create mode 100644 web/components/expanding-input.tsx create mode 100644 web/components/input.tsx diff --git a/web/components/amount-input.tsx b/web/components/amount-input.tsx index 65a79c20..8cd43369 100644 --- a/web/components/amount-input.tsx +++ b/web/components/amount-input.tsx @@ -6,6 +6,7 @@ import { Col } from './layout/col' import { ENV_CONFIG } from 'common/envs/constants' import { Row } from './layout/row' import { AddFundsModal } from './add-funds-modal' +import { Input } from './input' export function AmountInput(props: { amount: number | undefined @@ -44,9 +45,9 @@ export function AmountInput(props: { {label} - {!wasResolvedTo && (showChoice === 'checkbox' ? ( -
Add your answer
-