enhancement(web): pending component placement (#1402)

This commit is contained in:
martylukyy 2024-02-13 11:53:14 +01:00 committed by GitHub
parent 0174d743b1
commit 6e62c30d68
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 6 deletions

View file

@ -316,7 +316,7 @@ export const AuthRoute = createRoute({
function AuthenticatedLayout() { function AuthenticatedLayout() {
return ( return (
<div className="min-h-screen"> <div className="flex flex-col min-h-screen">
<Header/> <Header/>
<Outlet/> <Outlet/>
</div> </div>
@ -364,7 +364,7 @@ const routeTree = RootRoute.addChildren([
export const Router = createRouter({ export const Router = createRouter({
routeTree, routeTree,
defaultPendingComponent: () => ( defaultPendingComponent: () => (
<div className="absolute top-1/4 left-1/2 !border-0"> <div className="flex flex-grow items-center justify-center col-span-9">
<RingResizeSpinner className="text-blue-500 size-24"/> <RingResizeSpinner className="text-blue-500 size-24"/>
</div> </div>
), ),

View file

@ -7,8 +7,10 @@ import { Stats } from "./dashboard/Stats";
import { ActivityTable } from "./dashboard/ActivityTable"; import { ActivityTable } from "./dashboard/ActivityTable";
export const Dashboard = () => ( export const Dashboard = () => (
<div className="my-6 max-w-screen-xl mx-auto pb-6 px-2 sm:px-6 lg:pb-16 lg:px-8"> <main>
<Stats /> <div className="my-6 max-w-screen-xl mx-auto pb-6 px-2 sm:px-6 lg:pb-16 lg:px-8">
<ActivityTable /> <Stats />
</div> <ActivityTable />
</div>
</main>
); );