// Confirmation screen — boarding pass reveal
const ScreenConfirm = ({ flight, query, selectedSeat, passenger, onReset }) => {
const [revealed, setRevealed] = useState(false);
useEffect(() => {
const t = setTimeout(() => setRevealed(true), 350);
return () => clearTimeout(t);
}, []);
const bookingRef = useMemo(() => {
const seed = (passenger.last || "AERIA") + flight.id;
const rnd = randSeed(seed);
const chars = "ABCDEFGHJKLMNPQRSTUVWXYZ23456789";
let s = "";
for (let i = 0; i < 6; i++) s += chars[Math.floor(rnd() * chars.length)];
return s;
}, [passenger.last, flight.id]);
const gate = useMemo(() => {
const r = randSeed(bookingRef);
return ["A", "B", "C", "D"][Math.floor(r() * 4)] + (1 + Math.floor(r() * 32));
}, [bookingRef]);
return (
{/* drifting plane */}
⤳ Confirmed · {bookingRef} · {new Date().toUTCString().slice(0, 16)}
You're flying.
We sent the receipt to {passenger.email}. Your boarding pass lives in this app and in Wallet, ready 24h before takeoff.
{/* Boarding pass */}
{/* Notch holes */}
{/* Main panel */}
{/* Top brand */}
aeria
BOARDING PASS
{flight.carrier.name}
Flight {flight.id} · {flight.aircraft}
{/* Big route */}
{query.origin.city}
{flight.origin}
{query.origin.name}
{query.dest.city}
{flight.dest}
{query.dest.name}
{/* Detail strip */}
{/* Foot */}
This pass is your ticket. Have ID ready at the gate.
e-Ticket {bookingRef}-01
{/* Right stub */}
{/* Next steps */}
{[
{ t: "Add to Wallet", d: "Apple Wallet · Google Wallet", icon:
},
{ t: "Plan {city} arrival".replace("{city}", query.dest.city), d: "Curated guides, pre-booked SIM, transit pass", icon: },
{ t: "Earn 4,820 miles", d: "Posts to your Aeria Loyalty account in 24h", icon: },
].map((c, i) => (
{c.icon}
{c.t}
{c.d}
Continue
))}
);
};
function Detail({ label, value, accent }) {
return (
);
}
function StubItem({ label, value, accent }) {
return (
);
}
window.ScreenConfirm = ScreenConfirm;