From 664fd1c2d0a0d17c0e337be285542833d67ec27e Mon Sep 17 00:00:00 2001 From: Dan Ditomaso Date: Wed, 19 Feb 2025 10:11:42 -0500 Subject: [PATCH] chore: format file --- src/components/PageComponents/Connect/HTTP.tsx | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/src/components/PageComponents/Connect/HTTP.tsx b/src/components/PageComponents/Connect/HTTP.tsx index 0e1e6603..7eb39e95 100644 --- a/src/components/PageComponents/Connect/HTTP.tsx +++ b/src/components/PageComponents/Connect/HTTP.tsx @@ -28,13 +28,8 @@ export const HTTP = ({ closeDialog }: TabElementProps): JSX.Element => { }, }); - const tlsEnabled = useWatch({ - control, - name: "tls", - defaultValue: location.protocol === "https:", - }); - const [connectionInProgress, setConnectionInProgress] = useState(false); + const [https, setHTTPS] = useState(false); const onSubmit = handleSubmit(async (data) => { setConnectionInProgress(true); @@ -46,7 +41,7 @@ export const HTTP = ({ closeDialog }: TabElementProps): JSX.Element => { await connection.connect({ address: data.ip, fetchInterval: 2000, - tls: data.tls, + tls: https, }); setSelectedDevice(id); @@ -60,8 +55,7 @@ export const HTTP = ({ closeDialog }: TabElementProps): JSX.Element => {
{ control={control} render={({ field: { value, ...rest } }) => ( <> - + { + checked ? setHTTPS(true) : setHTTPS(false); + }} // label="Use TLS" // description="Description" disabled={