diff --git a/src/components/header/index.tsx b/src/components/header/index.tsx index aac0d86..8d55e3c 100644 --- a/src/components/header/index.tsx +++ b/src/components/header/index.tsx @@ -11,7 +11,9 @@ import { ReactComponent as ThemeDarkButtonIcon } from "assets/svg/theme_dark_but import { ReactComponent as ThemeSynthButtonIcon } from "assets/svg/theme_synth_button.svg"; import NotificationsPopup from "components/notificationsPopup"; import ResetPopup from "components/resetPopup"; +import ToggleBtn from "components/toggleBtn"; import { handleDataExport } from "lib"; +import { getStoredData, writeStoredData } from "lib/localStorage"; import { ThemeName, showThemeName } from "theme"; import "./styles.scss"; @@ -69,6 +71,19 @@ const Header = ({ ); + const data = getStoredData(); + const [inputData, setInputData] = useState({ + responseExport: data.responseExport + }); + + const handleToggleBtn = (e: any) => { + + const currentStoredData = getStoredData(); + + setInputData({ ...inputData, responseExport: e.target.checked}); + writeStoredData({ ...currentStoredData, responseExport: e.target.checked}); + }; + return ( + +
Auto Download
+
+ +
+