MCPcopy Index your code
hub / github.com/sqlchat/sqlchat / handleClearData

Function handleClearData

src/components/ClearDataConfirmModal.tsx:13–20  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

11 const { t } = useTranslation();
12
13 const handleClearData = () => {
14 window.localStorage.clear();
15 close();
16 toast.success("Data cleared. The page will be reloaded.");
17 setTimeout(() => {
18 window.location.reload();
19 }, 500);
20 };
21
22 return (
23 <Modal title="Clear all data" className="!w-96" onClose={close}>

Callers

nothing calls this directly

Calls 1

closeFunction · 0.70

Tested by

no test coverage detected