From 0cdb6d0da1eef0a44f1bad98b715e007c418f317 Mon Sep 17 00:00:00 2001 From: Matchu Date: Sat, 1 Aug 2020 00:42:36 -0700 Subject: [PATCH] stop showing duplicate support secret toasts --- src/app/HomePage.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/HomePage.js b/src/app/HomePage.js index eb41a1f..dd14065 100644 --- a/src/app/HomePage.js +++ b/src/app/HomePage.js @@ -244,8 +244,9 @@ function useSupportSetup() { React.useEffect(() => { const params = new URLSearchParams(location.search); const supportSecret = params.get("supportSecret"); + const existingSupportSecret = localStorage.getItem("supportSecret"); - if (supportSecret) { + if (supportSecret && supportSecret !== existingSupportSecret) { localStorage.setItem("supportSecret", supportSecret); toast({