chore: show prompt to let the user know

This commit is contained in:
JustSong committed 2023-10-14 16:32:01 +08:00
1 parent 215cad9bae
commit f6811a11a9
2 files changed
+26 -4

No files matched your search

+11 -1
View File
@@ -186,4 +186,14 @@ export const verifyJSON = (str) => {
return false;
}
return true;
};
};
export function shouldShowPrompt(id) {
let prompt = localStorage.getItem(`prompt-${id}`);
return !prompt;
}
export function setPromptShown(id) {
localStorage.setItem(`prompt-${id}`, 'true');
}