mirror of
https://github.com/urbit/shrub.git
synced 2024-12-22 18:31:44 +03:00
13 lines
370 B
TypeScript
13 lines
370 B
TypeScript
import { createStorageKey } from './logic/lib/util';
|
|
|
|
const key = createStorageKey(`storage-wipe-${process.env.LANDSCAPE_LAST_WIPE}`);
|
|
const wiped = localStorage.getItem(key);
|
|
|
|
// Loaded before everything, this clears local storage just once.
|
|
// Change VITE_LAST_WIPE in .env to date of wipe
|
|
|
|
if (!wiped) {
|
|
localStorage.clear();
|
|
localStorage.setItem(key, 'true');
|
|
}
|