Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

remove usememo

Steven Tey6d2d5bcc28ff
diff --git a/apps/web/ui/layout/sidebar/sidebar-nav.tsx b/apps/web/ui/layout/sidebar/sidebar-nav.tsx
index 6c4673ca77..afcc0f6e37 100644
--- a/apps/web/ui/layout/sidebar/sidebar-nav.tsx
+++ b/apps/web/ui/layout/sidebar/sidebar-nav.tsx
@@ -100,11 +100,7 @@ function NavItem({ item }: { item: NavItemType }) {
const { name, icon: Icon, href, exact } = item;
const pathname = usePathname();
-
- const isActive = useMemo(
- () => (exact ? pathname === href : pathname.startsWith(href)),
- [exact, pathname, href],
- );
+ const isActive = exact ? pathname === href : pathname.startsWith(href);
const [hovered, setHovered] = useState(false);