Skip to content

Commit 42cbbf1

Browse files
perf(web): main app navigation compiles without manual memoization
Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent a702563 commit 42cbbf1

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎apps/web/src/components/sidebar/mainAppLocation.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { useLocation, useNavigate } from "@tanstack/react-router";
2-
import { useCallback, useEffect } from "react";
2+
import { useEffect } from "react";
33

44
export function isSidebarUtilityPage(pathname: string) {
55
return (
@@ -25,5 +25,5 @@ export function MainAppLocationTracker() {
2525

2626
export function useNavigateToMainApp() {
2727
const navigate = useNavigate();
28-
return useCallback(() => navigate({ href: mainAppHref ?? "/" }), [navigate]);
28+
return () => navigate({ href: mainAppHref ?? "/" });
2929
}

0 commit comments

Comments
 (0)