feat/sidebar-skeleton: added sidebar skeleton

This commit is contained in:
Linus Flood
2024-12-17 07:17:30 +01:00
parent 39c3a8bf76
commit daa677d605
4 changed files with 23 additions and 4 deletions
+4 -1
View File
@@ -5,6 +5,7 @@ import { serverClient } from "@/lib/trpc/server"
import Blocks from "@/components/Blocks"
import Hero from "@/components/Hero"
import MaxWidth from "@/components/MaxWidth"
import SidebarSkeleton from "@/components/MyPages/Sidebar/SidebarSkeleton"
import Sidebar from "@/components/Sidebar"
import Preamble from "@/components/TempDesignSystem/Text/Preamble"
import Title from "@/components/TempDesignSystem/Text/Title"
@@ -25,7 +26,9 @@ export default async function LoyaltyPage() {
<>
<section className={styles.content}>
{loyaltyPage.sidebar?.length ? (
<Sidebar blocks={loyaltyPage.sidebar} />
<Suspense fallback={<SidebarSkeleton />}>
<Sidebar blocks={loyaltyPage.sidebar} />
</Suspense>
) : null}
<MaxWidth className={styles.blocks}>