Suspense on Sidebar
This commit is contained in:
@@ -1,3 +1,6 @@
|
|||||||
|
import { Suspense } from "react"
|
||||||
|
|
||||||
|
import LoadingSpinner from "@/components/LoadingSpinner"
|
||||||
import Sidebar from "@/components/MyPages/Sidebar"
|
import Sidebar from "@/components/MyPages/Sidebar"
|
||||||
|
|
||||||
import styles from "./layout.module.css"
|
import styles from "./layout.module.css"
|
||||||
@@ -13,7 +16,9 @@ export default async function MyPagesLayout({
|
|||||||
<section className={styles.layout}>
|
<section className={styles.layout}>
|
||||||
{breadcrumbs}
|
{breadcrumbs}
|
||||||
<section className={styles.content}>
|
<section className={styles.content}>
|
||||||
<Sidebar />
|
<Suspense fallback={<LoadingSpinner />}>
|
||||||
|
<Sidebar />
|
||||||
|
</Suspense>
|
||||||
{children}
|
{children}
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|||||||
Reference in New Issue
Block a user