diff --git a/web/src/components/storage/ProposalPage.jsx b/web/src/components/storage/ProposalPage.jsx index f17568c08b..c8351e7398 100644 --- a/web/src/components/storage/ProposalPage.jsx +++ b/web/src/components/storage/ProposalPage.jsx @@ -232,6 +232,7 @@ export default function ProposalPage() { { const rootVolume = (settings.volumes || []).find((i) => i.mountPath === "/"); - const initialChecked = rootVolume !== undefined && hasFS(rootVolume, "Btrfs") && rootVolume.snapshots; - const [isChecked, setIsChecked] = useState(initialChecked); - // no root volume is probably some error or still loading if (rootVolume === undefined) { return ; } + const isChecked = rootVolume !== undefined && hasFS(rootVolume, "Btrfs") && rootVolume.snapshots; + const switchState = (_, checked) => { - setIsChecked(checked); onChange({ active: checked, settings }); };