Added local storage clearing for cache clear
This commit is contained in:
parent
b184f5798c
commit
68f5a409e2
@ -12,11 +12,15 @@ function SettingsModal({ isOpen, onRequestClose }) {
|
||||
const [isDeleteModalOpen, setIsDeleteModalOpen] = useState(false);
|
||||
|
||||
async function handleEraseAllData() {
|
||||
localStorage.clear();
|
||||
await database.delete();
|
||||
window.location.reload();
|
||||
}
|
||||
|
||||
async function handleClearCache() {
|
||||
// Clear saved settings
|
||||
localStorage.clear();
|
||||
// Clear map cache
|
||||
await database.table("maps").where("owner").notEqual(userId).delete();
|
||||
// Find all other peoples tokens who aren't benig used in a map state and delete them
|
||||
const tokens = await database
|
||||
|
Loading…
Reference in New Issue
Block a user