From eac4d980a670b266fe2637cb91b0e8f9c4d85710 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Fri, 30 Jun 2023 02:40:34 -0700 Subject: fixed websockets issue --- extension/react-app/src/tabs/gui.tsx | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'extension/react-app/src') diff --git a/extension/react-app/src/tabs/gui.tsx b/extension/react-app/src/tabs/gui.tsx index 3e0fce6d..39925fc5 100644 --- a/extension/react-app/src/tabs/gui.tsx +++ b/extension/react-app/src/tabs/gui.tsx @@ -58,13 +58,13 @@ function GUI(props: GUIProps) { const [dataSwitchChecked, setDataSwitchChecked] = useState(false); const dataSwitchOn = useSelector( (state: RootStore) => state.config.dataSwitchOn - ) + ); useEffect(() => { if (typeof dataSwitchOn !== "undefined") { - setDataSwitchChecked(dataSwitchOn) + setDataSwitchChecked(dataSwitchOn); } - }, [dataSwitchOn]) + }, [dataSwitchOn]); const [usingFastModel, setUsingFastModel] = useState(false); const [waitingForSteps, setWaitingForSteps] = useState(false); @@ -548,9 +548,9 @@ function GUI(props: GUIProps) { }} hidden={!showDataSharingInfo} > - By turning on this switch, you will begin collecting accepted and - rejected suggestions in .continue/suggestions.json. This data is - stored locally on your machine and not sent anywhere. + By turning on this switch, you will begin collecting accepted and + rejected suggestions in .continue/suggestions.json. This data is stored + locally on your machine and not sent anywhere.

@@ -583,15 +583,13 @@ function GUI(props: GUIProps) { vscMachineId: vscMachineId, dataSwitchChecked: !dataSwitchChecked, }); - postVscMessage("toggleDataSwitch", {on: !dataSwitchChecked}) + postVscMessage("toggleDataSwitch", { on: !dataSwitchChecked }); setDataSwitchChecked((prev) => !prev); }} onColor="#12887a" checked={dataSwitchChecked} /> - - Collect Data - + Collect Data { @@ -616,7 +614,10 @@ function GUI(props: GUIProps) { > - + -- cgit v1.2.3-70-g09d2