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

View File

@@ -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 (