+ {state === "success" && <>
+
+ Neon would like to transfer a Stack Auth project and link it to your own account. This will let you access the project from Stack Auth's dashboard.
+
+ {user ? (
+ <>
+
+ Which Stack Auth account would you like to transfer the project to? (You'll still be able to access your project from Neon's dashboard.)
+
+ } value={`Signed in as ${user.primaryEmail || user.displayName || "Unnamed user"}`} />
+
+ >
+ ) : (
+
+ To continue, please sign in or create a Stack Auth account.
+
+ )}
+ >}
+
+ {typeof state !== "string" && <>
+
+ {state.message}
+
+ >}
+
+
+ {state === "success" &&
+
+
+
+
+ }
+
+ );
+}
diff --git a/apps/dashboard/src/app/(main)/integrations/neon/projects/transfer/confirm/page.tsx b/apps/dashboard/src/app/(main)/integrations/neon/projects/transfer/confirm/page.tsx
index f4cae6b4d2..27401cbf02 100644
--- a/apps/dashboard/src/app/(main)/integrations/neon/projects/transfer/confirm/page.tsx
+++ b/apps/dashboard/src/app/(main)/integrations/neon/projects/transfer/confirm/page.tsx
@@ -1,4 +1,4 @@
-import IntegrationProjectTransferConfirmPageClient from "@/app/(main)/integrations/transfer-confirm-page";
+import NeonIntegrationProjectTransferConfirmPageClient from "@/app/(main)/integrations/neon-transfer-confirm-page";
export const metadata = {
title: "Project transfer",
@@ -14,7 +14,7 @@ export default async function Page(props: { searchParams: Promise<{ code?: strin
return (
<>
-
+
>
);
}
diff --git a/apps/dashboard/src/app/(main)/integrations/transfer-confirm-page.tsx b/apps/dashboard/src/app/(main)/integrations/transfer-confirm-page.tsx
index 6b19aa3dd7..bd0e0da2ee 100644
--- a/apps/dashboard/src/app/(main)/integrations/transfer-confirm-page.tsx
+++ b/apps/dashboard/src/app/(main)/integrations/transfer-confirm-page.tsx
@@ -1,28 +1,40 @@
"use client";
-import { Logo } from "@/components/logo";
+import { DesignAlert } from "@/components/design-components/alert";
+import { ProjectTransferConfirmView, type ProjectTransferConfirmUiState } from "@/components/project-transfer-confirm-view";
import { useRouter } from "@/components/router";
-import { Button, Card, CardContent, CardFooter, CardHeader, Input, Typography } from "@/components/ui";
import { stackAppInternalsSymbol } from "@/lib/stack-app-internals";
import { useStackApp, useUser } from "@stackframe/stack";
import { runAsynchronously, wait } from "@stackframe/stack-shared/dist/utils/promises";
-import Image from "next/image";
import { useSearchParams } from "next/navigation";
import { useEffect, useState } from "react";
-import NeonLogo from "../../../../public/neon.png";
-export default function IntegrationProjectTransferConfirmPageClient(props: { type: "neon" | "custom" }) {
+export function TransferConfirmMissingCodeView() {
+ return (
+
- {state === 'success' && <>
-
- {props.type === "neon" ? "Neon" : "A third party"} would like to transfer a Stack Auth project and link it to your own account. This will let you access the project from Stack Auth's dashboard.
-
- {user ? (
- <>
-
- Which Stack Auth account would you like to transfer the project to? (You'll still be able to access your project from {props.type === "neon" ? "Neon" : "the third party"}'s dashboard.)
-
- } value={`Signed in as ${user.primaryEmail || user.displayName || "Unnamed user"}`} />
-
- >
- ) : (
-
- To continue, please sign in or create a Stack Auth account.
-
- )}
- >}
-
- {typeof state !== 'string' && <>
-
- {state.message}
-
- >}
+ const signedIn = user != null;
+ const accountLabel = user
+ ? `Signed in as ${user.primaryEmail ?? user.displayName ?? "Unnamed user"}`
+ : undefined;
-
- {state === 'success' &&
-