From 572454f01749b4e8b43bfd9c1fcc47210d86fa0f Mon Sep 17 00:00:00 2001 From: Joe Banks Date: Thu, 11 Jul 2024 02:24:08 +0100 Subject: Handle voting component callbacks --- src/api/question.ts | 1 + src/components/InputTypes/index.tsx | 5 +++++ src/components/Question.tsx | 18 +++++++++++++++--- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/src/api/question.ts b/src/api/question.ts index 56706e2..0fcea03 100644 --- a/src/api/question.ts +++ b/src/api/question.ts @@ -8,6 +8,7 @@ export enum QuestionType { Range = "range", Section = "section", TimeZone = "timezone", + Vote = "vote" } export interface Question { diff --git a/src/components/InputTypes/index.tsx b/src/components/InputTypes/index.tsx index ee92ef1..1880bcd 100644 --- a/src/components/InputTypes/index.tsx +++ b/src/components/InputTypes/index.tsx @@ -11,6 +11,7 @@ import {QuestionType} from "../../api/question"; import RenderedQuestion from "../Question"; import Code from "./Code"; import TimeZone from "./TimeZone"; +import Vote from "./Vote"; export default function create_input( {props: renderedQuestionProps, realState}: RenderedQuestion, @@ -67,6 +68,10 @@ export default function create_input( result = ; break; + case QuestionType.Vote: + result = ; + break; + default: result =