From 6ec7efb4fc860e6419d1f63f8113a760996feec4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89mile=20R=C3=A9?= Date: Fri, 26 Jun 2026 22:35:20 +0200 Subject: [PATCH] Use layout skeleton as the root route fallback MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On a hard reload the root route briefly showed a generic centered pulse (PageSkeleton) while the layout chunk downloaded, then snapped to the topbar skeleton. Point the root Fallback at MainLayoutSkeleton so the chunk-load fallback matches the loader's own skeleton and the transition is seamless. PageSkeleton is now unused and removed. Signed-off-by: Émile Ré --- .../src/components/skeletons/PageSkeleton.tsx | 21 ------------------- apps/compliance-portal/src/routes.tsx | 4 ++-- 2 files changed, 2 insertions(+), 23 deletions(-) delete mode 100644 apps/compliance-portal/src/components/skeletons/PageSkeleton.tsx diff --git a/apps/compliance-portal/src/components/skeletons/PageSkeleton.tsx b/apps/compliance-portal/src/components/skeletons/PageSkeleton.tsx deleted file mode 100644 index 32c0f55ca..000000000 --- a/apps/compliance-portal/src/components/skeletons/PageSkeleton.tsx +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2026 Probo Inc . -// -// Permission to use, copy, modify, and/or distribute this software for any -// purpose with or without fee is hereby granted, provided that the above -// copyright notice and this permission notice appear in all copies. -// -// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -// REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -// AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -// INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -// LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -// OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -// PERFORMANCE OF THIS SOFTWARE. - -export function PageSkeleton() { - return ( -
-
-
- ); -} diff --git a/apps/compliance-portal/src/routes.tsx b/apps/compliance-portal/src/routes.tsx index 4e55ece32..e97dfad47 100644 --- a/apps/compliance-portal/src/routes.tsx +++ b/apps/compliance-portal/src/routes.tsx @@ -16,14 +16,14 @@ import { lazy } from "@probo/react-lazy"; import { type AppRoute, routeFromAppRoute } from "@probo/routes"; import { createBrowserRouter } from "react-router"; -import { PageSkeleton } from "#/components/skeletons/PageSkeleton"; import { getPathPrefix } from "#/lib/http/pathPrefix"; import { HomePageSkeleton } from "#/pages/HomePageSkeleton"; +import { MainLayoutSkeleton } from "#/pages/MainLayoutSkeleton"; const routes = [ { path: "/", - Fallback: PageSkeleton, + Fallback: MainLayoutSkeleton, Component: lazy(() => import("#/pages/MainLayoutLoader")), children: [ {