Skip to content
Snippets Groups Projects
Commit d9cfcba9 authored by timothycarambat's avatar timothycarambat
Browse files

prevent holdToReveal from spamming toasts

parent 69cb71b1
No related branches found
No related tags found
No related merge requests found
......@@ -413,7 +413,10 @@ function HoldToReveal({ children, holdForMs = 3_000 }) {
if (!["Control", "Meta"].includes(e.key)) return;
timeout = setTimeout(() => {
setShowing(true);
showToast("Experimental feature previews unlocked!");
// Setting toastId prevents hook spam from holding control too many times or the event not detaching
showToast("Experimental feature previews unlocked!", {
toastId: "anythingllm_experimental_feature_preview_unlocked",
});
window.localStorage.setItem(
"anythingllm_experimental_feature_preview_unlocked",
"enabled"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment