Graphical PDS migrator for AT Protocol
at main 1.4 kB view raw
1import { PageProps } from "fresh"; 2import MigrationProgress from "../../islands/MigrationProgress.tsx"; 3 4export default function MigrateProgress(props: PageProps) { 5 const service = props.url.searchParams.get("service") || ""; 6 const handle = props.url.searchParams.get("handle") || ""; 7 const email = props.url.searchParams.get("email") || ""; 8 const password = props.url.searchParams.get("password") || ""; 9 const invite = props.url.searchParams.get("invite") || undefined; 10 11 if (!service || !handle || !email || !password) { 12 return ( 13 <div class="bg-gray-50 dark:bg-gray-900 p-4"> 14 <div class="max-w-2xl mx-auto"> 15 <div class="bg-red-50 dark:bg-red-900 p-4 rounded-lg"> 16 <p class="text-red-800 dark:text-red-200"> 17 Missing required parameters. Please return to the migration setup 18 page. 19 </p> 20 </div> 21 </div> 22 </div> 23 ); 24 } 25 26 return ( 27 <div class="bg-gray-50 dark:bg-gray-900 p-4"> 28 <div class="max-w-2xl mx-auto"> 29 <h1 class="font-mono text-3xl font-bold text-gray-900 dark:text-white mb-8"> 30 Migration Progress 31 </h1> 32 <MigrationProgress 33 service={service} 34 handle={handle} 35 email={email} 36 password={password} 37 invite={invite} 38 /> 39 </div> 40 </div> 41 ); 42}