Refactor header and layout components, remove About page, and introduce Background component for improved UI structure

This commit is contained in:
Jose Selesan
2026-06-01 15:50:33 -03:00
parent 78df95e985
commit c18db76c7a
10 changed files with 41 additions and 138 deletions

View File

@@ -1,3 +1,4 @@
import { Background } from '@/components/background';
import { Layout } from '@/components/layout';
import { NotFoundPage } from '@/features/not-found/not-found-page';
import { ServerErrorPage } from '@/features/server-error/server-error-page';
@@ -16,14 +17,27 @@ export const Route = createRootRouteWithContext<RouterContext>()({
notFoundComponent: NotFoundPage,
});
const AUTH_PAGE_REGEX =
/^\/(login|select-complex|reset-password|onboard|invite|auth-callback)(?:\/|$)/;
function RootRoute() {
const location = useLocation();
const isPublicBookingRoute = /^\/[^/]+\/booking(?:\/|$)/.test(location.pathname);
const isAuthPage = AUTH_PAGE_REGEX.test(location.pathname);
if (isPublicBookingRoute) {
return <Outlet />;
}
if (isAuthPage) {
return (
<div className="relative min-h-dvh overflow-x-hidden bg-background text-foreground">
<Background />
<Outlet />
</div>
);
}
return (
<Layout>
<div className="flex flex-col">