import React from "react"; type ToggleOverwriteProps = { overwrite: boolean; setOverwrite: (arg: any) => void; }; const ToggleOverwrite = ({ overwrite, setOverwrite }: ToggleOverwriteProps) => { return (
OVERWRITE PREVIOUS UPSCALE
{ setOverwrite((oldValue) => { if (oldValue === true) { localStorage.removeItem("overwrite"); } return !oldValue; }); localStorage.setItem("overwrite", JSON.stringify(!overwrite)); }} />