From 2d595f391ed2d4fbe3a4a88e9bffd2c18d71474c Mon Sep 17 00:00:00 2001 From: Richard87 Date: Tue, 17 Sep 2024 15:42:14 +0200 Subject: [PATCH] Bugfix rerendering NAV --- src/components/app-navbar/index.tsx | 4 ++-- src/effects/use-local-storage.ts | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/app-navbar/index.tsx b/src/components/app-navbar/index.tsx index 5016c9215..ed93fe3ed 100644 --- a/src/components/app-navbar/index.tsx +++ b/src/components/app-navbar/index.tsx @@ -121,8 +121,8 @@ const NavbarExpanded = ({ appName, links }: NavbarProps) => { - {links.map((link, i) => ( - + {links.map((link) => ( + ))} ( useInterval(() => { const current = getLocalStorageItem(key); - if (current != state) { + if (JSON.stringify(current) != JSON.stringify(state)) { + console.log('updating state', { current, state }); setState(current); } }, 250);