import { AlertCircle, Boxes, Key, Loader2 } from "lucide-react"; import { Button } from "@/components/ds/ui/button"; import { Input } from "@/components/ds/ui/input"; import { Label } from "@/components/ds/ui/label"; import { Alert, AlertDescription } from "@/components/ds/ui/alert"; import { useTranslate } from "ra-core"; import { TerminalLogs } from "../TerminalLogs"; import { LogEntry } from "../types"; interface MigrationStepProps { logs: LogEntry[]; error: string | null; migrating: boolean; complete: boolean; accessToken: string; onTokenChange: (value: string) => void; onRunMigration: () => void; } export function MigrationStep({ logs, error, migrating, complete, accessToken, onTokenChange, onRunMigration, }: MigrationStepProps) { const translate = useTranslate(); const needsToken = !accessToken && !migrating && !complete; const canRun = accessToken.trim().length > 0; return (
{migrating ? translate("setup.applyingSchemaDna") : complete ? translate("setup.systemReady") : needsToken ? translate("setup.tokenRequired") : translate("setup.readyToInstall")}
{translate("setup.tokenDescription")}
{translate("setup.generateAt")}{" "} supabase.com/dashboard/tokens