New UI for public booking

This commit is contained in:
Jose Selesan
2026-05-19 09:06:03 -03:00
parent b8abf224cf
commit c1d910708a
3 changed files with 1250 additions and 268 deletions

View File

@@ -3,7 +3,7 @@ import { NotFoundPage } from '@/features/not-found/not-found-page';
import { ServerErrorPage } from '@/features/server-error/server-error-page';
import type { ApiClient } from '@/lib/api-client';
import type { AuthContextValue } from '@/lib/auth';
import { Outlet, createRootRouteWithContext } from '@tanstack/react-router';
import { Outlet, createRootRouteWithContext, useLocation } from '@tanstack/react-router';
type RouterContext = {
auth: AuthContextValue;
@@ -17,6 +17,13 @@ export const Route = createRootRouteWithContext<RouterContext>()({
});
function RootRoute() {
const location = useLocation();
const isPublicBookingRoute = /^\/[^/]+\/booking(?:\/|$)/.test(location.pathname);
if (isPublicBookingRoute) {
return <Outlet />;
}
return (
<Layout>
<div className="flex flex-col">