feat(SW-1543): move auth check within component to be suspended

This commit is contained in:
Christian Andolf
2025-02-06 16:22:43 +01:00
parent ced8dd5d99
commit 69d57b73a2
4 changed files with 20 additions and 17 deletions
+7 -1
View File
@@ -1,3 +1,5 @@
import { Suspense } from "react"
import CardsGrid from "@/components/Blocks/CardsGrid"
import CarouselCards from "@/components/Blocks/CarouselCards"
import DynamicContent from "@/components/Blocks/DynamicContent"
@@ -106,7 +108,11 @@ export default function Blocks({ blocks }: BlocksProps) {
case BlocksEnums.block.FullWidthCampaign:
return <FullWidthCampaign content={block.full_width_campaign} />
case BlocksEnums.block.JoinScandicFriends:
return <JoinScandicFriends content={block.join_scandic_friends} />
return (
<Suspense>
<JoinScandicFriends content={block.join_scandic_friends} />
</Suspense>
)
default:
return null
}