From b445209fc2627251aa078d2692d1d53a8718db59 Mon Sep 17 00:00:00 2001 From: Hunter Thornsberry Date: Sat, 8 Jun 2024 11:31:40 -0400 Subject: [PATCH] mocked ui --- src/components/Dialog/QRDialog.tsx | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/components/Dialog/QRDialog.tsx b/src/components/Dialog/QRDialog.tsx index 265a98de..38d72895 100644 --- a/src/components/Dialog/QRDialog.tsx +++ b/src/components/Dialog/QRDialog.tsx @@ -18,6 +18,8 @@ import { QRCode } from "react-qrcode-logo"; import { DynamicForm } from "../Form/DynamicForm"; import { ToggleFieldProps, ToggleInput } from "../Form/FormToggle"; import { Button } from "../UI/Button"; +import { Switch } from "@components/UI/Switch.js"; +import { Controller, useForm, useWatch } from "react-hook-form"; export interface QRDialogProps { open: boolean; @@ -37,9 +39,13 @@ export const QRDialog = ({ const allChannels = Array.from(channels.values()); - const onSubmit = () => { - console.log("ran"); - }; + const { register, handleSubmit, control } = useForm<{ + replace: boolean; + }>({ + defaultValues: { + replace: true, + }, + }); useEffect(() => { const channelsToEncode = allChannels @@ -104,7 +110,11 @@ export const QRDialog = ({
+