Splitted sidebar skeletons

This commit is contained in:
Linus Flood
2024-12-17 07:45:55 +01:00
parent daa677d605
commit c45ef9d4a7
7 changed files with 81 additions and 18 deletions

View File

@@ -1,7 +1,11 @@
import { Suspense } from "react"
import { getName } from "@/lib/trpc/memoizedRequests"
import MyPagesSidebar from "@/components/MyPages/Sidebar"
import SidebarNavigationSkeleton from "../MyPages/Sidebar/SidebarNavigationSkeleton"
export default async function MyPagesNavigation() {
const user = await getName()
@@ -9,5 +13,9 @@ export default async function MyPagesNavigation() {
if (!user) {
return null
}
return <MyPagesSidebar />
return (
<Suspense fallback={<SidebarNavigationSkeleton />}>
<MyPagesSidebar />
</Suspense>
)
}