import { useEffect, useState } from "preact/hooks"; import { IS_BROWSER } from "fresh/runtime"; import { Link } from "../components/Link.tsx"; /** * The user interface for the ticket component. * @type {User} */ interface User { did: string; handle?: string; } /** * The ticket component for the landing page. * @returns The ticket component * @component */ export default function Ticket() { const [user, setUser] = useState(null); useEffect(() => { if (!IS_BROWSER) return; const fetchUser = async () => { try { const response = await fetch("/api/me", { credentials: "include", }); if (!response.ok) { throw new Error("Failed to fetch user profile"); } const userData = await response.json(); setUser( userData ? { did: userData.did, handle: userData.handle, } : null, ); } catch (error) { console.error("Failed to fetch user:", error); setUser(null); } }; fetchUser(); }, []); return (
BOARDING PASS

WHAT IS AIRPORT?

GATE A1
PASSENGER: {(user?.handle || "UNKNOWN").toUpperCase()}
DESTINATION: NEW PDS

ATP Airport is your digital terminal for AT Protocol account actions. We help you smoothly transfer your PDS account between different providers – no lost luggage, just a first-class experience for your data's journey to its new home.

Think you might need to migrate in the future but your PDS might be hostile or offline? No worries! You can go to the{" "} ticket booth {" "} and get a PLC key to use for account recovery in the future. Soon you'll also be able to go to baggage claim (take the air shuttle to terminal four) and get a downloadable backup of all your current PDS data in case that were to happen.

FLIGHT DETAILS

GET READY TO FLY

SEAT: 1A
CLASS: FIRST CLASS MIGRATION
FLIGHT: ATP-2024
  1. Check in with your current PDS credentials
  2. Select your destination PDS
  3. Go through security
  4. Sit back while we handle your data transfer
Coming from a Bluesky PDS? This is currently a ONE WAY TICKET because Bluesky doesn't support transfers back yet. Although they claim they will support it in the future, assume you won't be able to.
FROM
CURRENT PDS
TO
NEW PDS
); }