feat: wrap home page in DashboardShell, remove stat cards

Home page now uses the same sidebar layout as dashboard pages.
Sidebar shows simplified home mode (logo, app switcher, profile)
without site-specific nav groups. Stat cards removed — plan info
lives in settings, site count is self-evident from the list.
This commit is contained in:
Usman Baig
2026-03-28 19:12:45 +01:00
parent 07546576c1
commit a6054469ee
4 changed files with 49 additions and 119 deletions

View File

@@ -95,6 +95,7 @@ function LayoutInner({ children }: { children: React.ReactNode }) {
const showOfflineBar = Boolean(auth.user && !isOnline)
// Site pages use DashboardShell with full sidebar — no Header needed
const isSitePage = pathname.startsWith('/sites/') && pathname !== '/sites/new'
const isHomePage = pathname === '/'
// Checkout page has its own minimal layout — no app header/footer
const isCheckoutPage = pathname.startsWith('/checkout')
@@ -103,13 +104,13 @@ function LayoutInner({ children }: { children: React.ReactNode }) {
}
// While auth is loading on a site or checkout page, render nothing to prevent flash of public header
if (auth.loading && (isSitePage || isCheckoutPage)) {
if (auth.loading && (isSitePage || isCheckoutPage || isHomePage)) {
return null
}
// Authenticated site pages: full sidebar layout
// DashboardShell inside children handles everything
if (isAuthenticated && isSitePage) {
if (isAuthenticated && (isSitePage || isHomePage)) {
return (
<>
{showOfflineBar && <OfflineBanner isOnline={isOnline} />}