refactor: strip stats and unit switcher from top bar
Some checks failed
CI / ci (push) Failing after 19s
CI / e2e (push) Has been skipped

Remove weight unit switcher pills and collection stats (items, weight,
spent) from TotalsBar. Top bar now shows only logo/title and user menu.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-06 19:32:02 +02:00
parent 024e9f909b
commit e19d40e232
2 changed files with 3 additions and 86 deletions

View File

@@ -114,23 +114,8 @@ function RootLayout() {
const currentThreadId = threadMatch ? Number(threadMatch.threadId) : null;
const isDashboard = !!matchRoute({ to: "/" });
const isCollection = !!matchRoute({ to: "/collection", fuzzy: true });
const isSetupDetail = !!matchRoute({ to: "/setups/$setupId", fuzzy: true });
// Determine TotalsBar props based on current route
const _totalsBarProps = isDashboard
? { stats: [] as Array<{ label: string; value: string }> } // Title only, no stats, no link
: isSetupDetail
? { linkTo: "/" } // Setup detail will render its own local bar; root bar just has link
: { linkTo: "/" }; // All other pages: default stats + link to dashboard
// On dashboard, don't show the default global stats - pass empty stats
// On collection, let TotalsBar fetch its own global stats (default behavior)
const finalTotalsProps = isDashboard
? { stats: [] as Array<{ label: string; value: string }> }
: isCollection
? { linkTo: "/" }
: { linkTo: "/" };
const totalsBarProps = isDashboard ? {} : { linkTo: "/" };
// Show loading while checking auth
if (authLoading) {
@@ -170,7 +155,7 @@ function RootLayout() {
return (
<div className="min-h-screen bg-gray-50">
<TotalsBar {...finalTotalsProps} />
<TotalsBar {...totalsBarProps} />
<Outlet />
{/* Item Confirm Delete Dialog */}