refactor: remove unused HydrateFallback component to streamline code

This commit is contained in:
Ardeman 2025-03-19 18:53:44 +08:00
parent 2dc84c582d
commit 3847fd1896

View File

@ -1,4 +1,3 @@
import { ArrowPathIcon } from '@heroicons/react/24/solid'
import { isRouteErrorResponse } from 'react-router' import { isRouteErrorResponse } from 'react-router'
import { getCategories } from '~/apis/common/get-categories' import { getCategories } from '~/apis/common/get-categories'
@ -54,24 +53,6 @@ export const loader = async ({}: Route.LoaderArgs) => {
} }
} }
export const HydrateFallback = () => {
return (
<Card>
<div className="mt-3 mb-3 grid items-center justify-between border-b border-black pb-3 sm:mb-[30px] sm:pb-[30px]">
<h2 className="text-2xl font-extrabold text-[#2E2F7C] sm:text-4xl">
Loading...
</h2>
<p className="text-xl font-light text-[#777777] italic sm:text-2xl">
Please wait while we load the content.
</p>
</div>
<div className="flex items-center justify-center p-10">
<ArrowPathIcon className="size-10 animate-spin text-[#777777]" />
</div>
</Card>
)
}
export const ErrorBoundary = ({ error }: Route.ErrorBoundaryProps) => { export const ErrorBoundary = ({ error }: Route.ErrorBoundaryProps) => {
let message = 'Oops!' let message = 'Oops!'
let details = 'An unexpected error occurred.' let details = 'An unexpected error occurred.'