Skip to content

🐸 Rybbit - open-source and privacy-friendly alternative to Google Analytics that is 10x more intuitive.

fix build

Bill Yanga99e7a275e54
diff --git a/client/src/app/invitation/page.tsx b/client/src/app/invitation/page.tsx
index cb4b7a792..0af6d32fa 100644
--- a/client/src/app/invitation/page.tsx
+++ b/client/src/app/invitation/page.tsx
@@ -3,7 +3,7 @@
import { AlertCircle } from "lucide-react";
import Image from "next/image";
import { useRouter, useSearchParams } from "next/navigation";
-import { useState } from "react";
+import { Suspense, useState } from "react";
import { ThreeDotLoader } from "../../components/Loaders";
import { TopBar } from "../../components/TopBar";
import { Alert, AlertDescription, AlertTitle } from "../../components/ui/alert";
@@ -129,21 +129,31 @@ function AcceptInvitationInner() {
);
}
-export default function AcceptInvitation() {
+function InvitationContent() {
const { data: sessionData, isPending } = authClient.useSession();
+ return (
+ <>
+ {isPending ? (
+ <ThreeDotLoader />
+ ) : !sessionData?.user ? (
+ <AuthComponent />
+ ) : (
+ <AcceptInvitationInner />
+ )}
+ </>
+ );
+}
+
+export default function AcceptInvitation() {
return (
<div className="flex flex-col min-h-screen">
<TopBar />
<div className="flex justify-center items-center flex-grow p-4">
- {isPending ? (
- <ThreeDotLoader />
- ) : !sessionData?.user ? (
- <AuthComponent />
- ) : (
- <AcceptInvitationInner />
- )}
+ <Suspense fallback={<ThreeDotLoader />}>
+ <InvitationContent />
+ </Suspense>
</div>
</div>
);