From 0193245551b6511e1c5f7a2de3b2174dba4cb7ca Mon Sep 17 00:00:00 2001 From: maulanasdqn Date: Fri, 10 Apr 2026 14:47:24 +0700 Subject: [PATCH] fix: replace ugly Loading... text with spinner across all apps - Updated default HydrateFallback in file-based-routing to show a centered blue spinner instead of bare "Loading..." text - Added inline spinner to all index.html root divs so users see a spinner immediately while JS bundles load (instead of blank white) - Affects: dimentorin, hackathon, backoffice, gacha, qrcampaign, infra Co-Authored-By: Claude Opus 4.6 (1M context) --- apps/backoffice/index.html | 2 +- apps/dimentorin/index.html | 2 +- apps/gacha/index.html | 2 +- apps/hackathon/index.html | 2 +- apps/infra/index.html | 2 +- apps/qrcampaign/index.html | 2 +- .../src/react-router/file-based-routing.tsx | 18 ++++++++++++++++-- 7 files changed, 22 insertions(+), 8 deletions(-) diff --git a/apps/backoffice/index.html b/apps/backoffice/index.html index 8ba1c9a..63c4591 100644 --- a/apps/backoffice/index.html +++ b/apps/backoffice/index.html @@ -10,7 +10,7 @@ -
+
diff --git a/apps/dimentorin/index.html b/apps/dimentorin/index.html index 255a9a2..ea11ccc 100644 --- a/apps/dimentorin/index.html +++ b/apps/dimentorin/index.html @@ -10,7 +10,7 @@ -
+
diff --git a/apps/gacha/index.html b/apps/gacha/index.html index b509a0f..7fe855b 100644 --- a/apps/gacha/index.html +++ b/apps/gacha/index.html @@ -10,7 +10,7 @@ -
+
diff --git a/apps/hackathon/index.html b/apps/hackathon/index.html index efd8de5..3c914a7 100644 --- a/apps/hackathon/index.html +++ b/apps/hackathon/index.html @@ -37,7 +37,7 @@ /> -
+
diff --git a/apps/infra/index.html b/apps/infra/index.html index eed77cf..05fb8de 100644 --- a/apps/infra/index.html +++ b/apps/infra/index.html @@ -9,7 +9,7 @@ -
+
diff --git a/apps/qrcampaign/index.html b/apps/qrcampaign/index.html index 78379f6..09e0077 100644 --- a/apps/qrcampaign/index.html +++ b/apps/qrcampaign/index.html @@ -10,7 +10,7 @@ -
+
diff --git a/libs/utils/src/react-router/file-based-routing.tsx b/libs/utils/src/react-router/file-based-routing.tsx index 4d59c94..de9442a 100644 --- a/libs/utils/src/react-router/file-based-routing.tsx +++ b/libs/utils/src/react-router/file-based-routing.tsx @@ -237,7 +237,14 @@ function createRoute(args: { if (pageType === 'page' || pageType === 'layout') { route.element = ; route.HydrateFallback = - args.LoadingComponent ?? (() =>
Loading...
); + args.LoadingComponent ?? (() => ( +
+
+
+ +
+
+ )); route.action = args.action; route.loader = async (...props) => { if (!(await args.guard?.())) { @@ -256,7 +263,14 @@ function createRoute(args: { return { path: `${cleanPath}/${nextSegment}`, element: , - HydrateFallback: args.LoadingComponent ?? (() =>
Loading...
), + HydrateFallback: args.LoadingComponent ?? (() => ( +
+
+
+ +
+
+ )), action: args.action, loader: args.loader, handle: { pageType: pageType as 'layout' | 'page' },