diff --git a/components/Blocks/JoinScandicFriends/index.tsx b/components/Blocks/JoinScandicFriends/index.tsx index 3f0708bf9..30dc87e7a 100644 --- a/components/Blocks/JoinScandicFriends/index.tsx +++ b/components/Blocks/JoinScandicFriends/index.tsx @@ -1,3 +1,5 @@ +import { getProfileSafely } from "@/lib/trpc/memoizedRequests" + import { SurpriseIcon } from "@/components/Icons" import Image from "@/components/Image" import Button from "@/components/TempDesignSystem/Button" @@ -15,9 +17,14 @@ interface JoinScandicFriendsProps { content: JoinScandicFriends } -export default function JoinScandicFriends({ +export default async function JoinScandicFriends({ content, }: JoinScandicFriendsProps) { + const session = await getProfileSafely() + if (session) { + return null + } + const { show_header, show_usp, usp, primary_button } = content return ( diff --git a/components/Blocks/index.tsx b/components/Blocks/index.tsx index f0a5acf37..35037f803 100644 --- a/components/Blocks/index.tsx +++ b/components/Blocks/index.tsx @@ -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 case BlocksEnums.block.JoinScandicFriends: - return + return ( + + + + ) default: return null } diff --git a/components/ContentType/StartPage/index.tsx b/components/ContentType/StartPage/index.tsx index 01e174ecd..65769149d 100644 --- a/components/ContentType/StartPage/index.tsx +++ b/components/ContentType/StartPage/index.tsx @@ -45,7 +45,7 @@ export default async function StartPage() { ) : null}
- {(blocks || []).map((block, index) => { + {blocks.map((block, index) => { if (block.typename === BlocksEnums.block.FullWidthCampaign) { return ( val || []), system: systemSchema.merge( z.object({ created_at: z.string(),