From 9978c61fc163f034f6712770c84c27fa06050df4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Tron=C3=AD=C4=8Dek?= Date: Mon, 25 Sep 2023 15:12:17 +0000 Subject: [PATCH] Local storage control --- .../src/workspaces/BrowserExtensionBanner.tsx | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/components/dashboard/src/workspaces/BrowserExtensionBanner.tsx b/components/dashboard/src/workspaces/BrowserExtensionBanner.tsx index b836ead29619aa..adb0e6b83d867e 100644 --- a/components/dashboard/src/workspaces/BrowserExtensionBanner.tsx +++ b/components/dashboard/src/workspaces/BrowserExtensionBanner.tsx @@ -40,8 +40,15 @@ export function BrowserExtensionBanner({ parser = new UAParser() }: BrowserExten return null; } + const persistedDisabled = + localStorage.getItem("browser-extension-installed") || + localStorage.getItem("browser-extension-banner-dismissed"); + if (persistedDisabled) { + return null; + } + return ( -
+
@@ -55,11 +62,16 @@ export function BrowserExtensionBanner({ parser = new UAParser() }: BrowserExten
-
+
); }