mirror of
https://github.com/Mintplex-Labs/anything-llm.git
synced 2025-05-02 17:07:13 +00:00
prevent holdToReveal from spamming toasts
This commit is contained in:
parent
69cb71b1fc
commit
d9cfcba9bb
1 changed files with 4 additions and 1 deletions
|
@ -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"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue