From 3f60cd038682272c882134ad94dfb2c7fd0a65cd Mon Sep 17 00:00:00 2001 From: Robert Long <robert@robertlong.me> Date: Wed, 2 Feb 2022 13:30:36 -0800 Subject: [PATCH] Add feedback description input --- src/settings/SettingsModal.jsx | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/settings/SettingsModal.jsx b/src/settings/SettingsModal.jsx index 3d82000..014f92a 100644 --- a/src/settings/SettingsModal.jsx +++ b/src/settings/SettingsModal.jsx @@ -11,6 +11,7 @@ import { useMediaHandler } from "./useMediaHandler"; import { FieldRow, InputField, ErrorMessage } from "../input/Input"; import { Button } from "../button"; import { useSubmitRageshake } from "./useSubmitRageshake"; +import { Subtitle } from "../typography/Typography"; export function SettingsModal({ client, @@ -27,6 +28,8 @@ export function SettingsModal({ setVideoInput, } = useMediaHandler(client); + const [description, setDescription] = useState(""); + const { submitRageshake, sending, sent, error, downloadDebugLog } = useSubmitRageshake(); @@ -93,8 +96,19 @@ export function SettingsModal({ onChange={(e) => setShowInspector(e.target.checked)} /> </FieldRow> + <Subtitle>Feedback</Subtitle> <FieldRow> - <Button onPress={submitRageshake}> + <InputField + id="description" + name="description" + label="Description" + type="text" + value={description} + onChange={(e) => setDescription(e.target.value)} + /> + </FieldRow> + <FieldRow> + <Button onPress={() => submitRageshake({ description })}> {sent ? "Debug Logs Sent" : sending