import { savedOutputPathAtom, rememberOutputFolderAtom, } from "@/atoms/userSettingsAtom"; import { useAtom } from "jotai"; export function SaveOutputFolderToggle() { const [outputPath, setOutputPath] = useAtom(savedOutputPathAtom); const [rememberOutputFolder, setRememberOutputFolder] = useAtom( rememberOutputFolderAtom, ); return (

SAVE OUTPUT FOLDER

If enabled, the output folder will be remembered between sessions.

{outputPath}

{ setRememberOutputFolder((oldValue) => { if (oldValue === true) { setOutputPath(""); } return !oldValue; }); localStorage.setItem( "rememberOutputFolder", JSON.stringify(!rememberOutputFolder), ); }} />
); }