[WEB-5389] chore: enable progress bar for production builds and add logo spinner for hydration fallback (#8093)
* [WEB-5389] chore: enable progress bar for production builds * feat: add LogoSpinner to HydrateFallback in admin, space, and web apps
This commit is contained in:
parent
5d7bf554dd
commit
a407105bb8
6 changed files with 18 additions and 6 deletions
|
|
@ -5,6 +5,7 @@ import appleTouchIcon from "@/app/assets/favicon/apple-touch-icon.png?url";
|
||||||
import favicon16 from "@/app/assets/favicon/favicon-16x16.png?url";
|
import favicon16 from "@/app/assets/favicon/favicon-16x16.png?url";
|
||||||
import favicon32 from "@/app/assets/favicon/favicon-32x32.png?url";
|
import favicon32 from "@/app/assets/favicon/favicon-32x32.png?url";
|
||||||
import faviconIco from "@/app/assets/favicon/favicon.ico?url";
|
import faviconIco from "@/app/assets/favicon/favicon.ico?url";
|
||||||
|
import { LogoSpinner } from "@/components/common/logo-spinner";
|
||||||
import globalStyles from "@/styles/globals.css?url";
|
import globalStyles from "@/styles/globals.css?url";
|
||||||
import type { Route } from "./+types/root";
|
import type { Route } from "./+types/root";
|
||||||
import { AppProviders } from "./providers";
|
import { AppProviders } from "./providers";
|
||||||
|
|
@ -58,7 +59,11 @@ export default function Root() {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function HydrateFallback() {
|
export function HydrateFallback() {
|
||||||
return null;
|
return (
|
||||||
|
<div className="relative flex h-screen w-full items-center justify-center">
|
||||||
|
<LogoSpinner />
|
||||||
|
</div>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function ErrorBoundary() {
|
export function ErrorBoundary() {
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,6 @@ const PROGRESS_CONFIG: Readonly<ProgressConfig> = {
|
||||||
easing: "ease",
|
easing: "ease",
|
||||||
trickle: true,
|
trickle: true,
|
||||||
delay: 0,
|
delay: 0,
|
||||||
isDisabled: import.meta.env.PROD, // Disable progress bar in production builds
|
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ import appleTouchIcon from "@/app/assets/favicon/apple-touch-icon.png?url";
|
||||||
import favicon16 from "@/app/assets/favicon/favicon-16x16.png?url";
|
import favicon16 from "@/app/assets/favicon/favicon-16x16.png?url";
|
||||||
import favicon32 from "@/app/assets/favicon/favicon-32x32.png?url";
|
import favicon32 from "@/app/assets/favicon/favicon-32x32.png?url";
|
||||||
import faviconIco from "@/app/assets/favicon/favicon.ico?url";
|
import faviconIco from "@/app/assets/favicon/favicon.ico?url";
|
||||||
|
import { LogoSpinner } from "@/components/common/logo-spinner";
|
||||||
import globalStyles from "@/styles/globals.css?url";
|
import globalStyles from "@/styles/globals.css?url";
|
||||||
// types
|
// types
|
||||||
import type { Route } from "./+types/root";
|
import type { Route } from "./+types/root";
|
||||||
|
|
@ -62,7 +63,11 @@ export default function Root() {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function HydrateFallback() {
|
export function HydrateFallback() {
|
||||||
return null;
|
return (
|
||||||
|
<div className="relative flex h-screen w-full items-center justify-center">
|
||||||
|
<LogoSpinner />
|
||||||
|
</div>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function ErrorBoundary() {
|
export function ErrorBoundary() {
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,6 @@ const PROGRESS_CONFIG: Readonly<ProgressConfig> = {
|
||||||
easing: "ease",
|
easing: "ease",
|
||||||
trickle: true,
|
trickle: true,
|
||||||
delay: 0,
|
delay: 0,
|
||||||
isDisabled: import.meta.env.PROD, // Disable progress bar in production builds
|
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@ import faviconIco from "@/app/assets/favicon/favicon.ico?url";
|
||||||
import icon180 from "@/app/assets/icons/icon-180x180.png?url";
|
import icon180 from "@/app/assets/icons/icon-180x180.png?url";
|
||||||
import icon512 from "@/app/assets/icons/icon-512x512.png?url";
|
import icon512 from "@/app/assets/icons/icon-512x512.png?url";
|
||||||
import ogImage from "@/app/assets/og-image.png?url";
|
import ogImage from "@/app/assets/og-image.png?url";
|
||||||
|
import { LogoSpinner } from "@/components/common/logo-spinner";
|
||||||
import globalStyles from "@/styles/globals.css?url";
|
import globalStyles from "@/styles/globals.css?url";
|
||||||
import type { Route } from "./+types/root";
|
import type { Route } from "./+types/root";
|
||||||
// local
|
// local
|
||||||
|
|
@ -118,7 +119,11 @@ export default function Root() {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function HydrateFallback() {
|
export function HydrateFallback() {
|
||||||
return null;
|
return (
|
||||||
|
<div className="relative flex h-screen w-full items-center justify-center">
|
||||||
|
<LogoSpinner />
|
||||||
|
</div>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function ErrorBoundary({ error }: Route.ErrorBoundaryProps) {
|
export function ErrorBoundary({ error }: Route.ErrorBoundaryProps) {
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,6 @@ const PROGRESS_CONFIG: Readonly<ProgressConfig> = {
|
||||||
easing: "ease",
|
easing: "ease",
|
||||||
trickle: true,
|
trickle: true,
|
||||||
delay: 0,
|
delay: 0,
|
||||||
isDisabled: import.meta.env.PROD, // Disable progress bar in production builds
|
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue