diff --git a/src/app/invite/[token]/page.tsx b/src/app/invite/[token]/page.tsx index 9adc212..eb42768 100644 --- a/src/app/invite/[token]/page.tsx +++ b/src/app/invite/[token]/page.tsx @@ -4,13 +4,15 @@ import { useEffect, useState } from "react" import { useParams, useRouter } from "next/navigation" import { Button } from "@/components/ui/button" import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card" +import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar" +import { Logo } from "@/components/brand/logo" import { supabase } from "@/lib/supabase/client" import { Loader2, CheckCircle, LogIn, XCircle } from "lucide-react" import { toast } from "sonner" import Link from "next/link" import { useOnboardingStatus, useCompleteOnboarding } from "@/hooks/useOnboardingStatus" import { HelperInviteAcceptance } from "@/components/auth/helper-invite-acceptance" -import { useAcceptProjectInvite } from "@/hooks/useProject" +import { useAcceptProjectInvite, useProjectBranding } from "@/hooks/useProject" export default function InviteAcceptancePage() { const params = useParams() @@ -30,6 +32,10 @@ export default function InviteAcceptancePage() { const { data: onboardingStatus } = useOnboardingStatus() const completeOnboarding = useCompleteOnboarding() const acceptInvite = useAcceptProjectInvite() + const projectIdForBranding = (project?.project_id as string | undefined) ?? "" + const { data: brandingData } = useProjectBranding(projectIdForBranding) + const projectLogo = brandingData?.logo_url || null + const projectName = String(project?.name ?? "the project") // Check authentication and find invite by token useEffect(() => { @@ -201,7 +207,7 @@ export default function InviteAcceptancePage() { if (isLoading) { return ( -
+

Loading invite...

@@ -212,11 +218,11 @@ export default function InviteAcceptancePage() { if (error || !project) { return ( -
+
- + Invalid invite link
@@ -235,7 +241,7 @@ export default function InviteAcceptancePage() { if (isMember) { return ( -
+
@@ -243,12 +249,12 @@ export default function InviteAcceptancePage() { You're already a member
- You're already a member of {String(project?.name ?? "this project")}. + You're already a member of {projectName}.
- @@ -261,9 +267,9 @@ export default function InviteAcceptancePage() { // Show profile completion form if needed if (isAuthenticated && needsProfile && inviteData?.invite_type === "helper") { return ( -
+
@@ -271,14 +277,36 @@ export default function InviteAcceptancePage() { } const inviteTypeLabel = inviteData?.invite_type === "helper" ? "as a helper" : "as a member" + const projectInitial = projectName?.[0]?.toUpperCase() || "?" return ( -
+
+ {/* Two-logos-with-dotted-line composition: Githelp ยทยทยท Project */} +
+
+ +
+
+
+ + + + {projectInitial} + + +
+
You've been invited! - Join {String(project?.name ?? "this project")} {inviteTypeLabel} + Join {projectName} {inviteTypeLabel} @@ -288,7 +316,7 @@ export default function InviteAcceptancePage() { Sign in to accept this invitation and join the project.

- @@ -302,7 +330,8 @@ export default function InviteAcceptancePage() {