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 = ({