stop showing duplicate support secret toasts

This commit is contained in:
Emi Matchu 2020-08-01 00:42:36 -07:00
parent 3c54653646
commit 0cdb6d0da1

View file

@ -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({