import { content } from "@deadhead/content"; import { formatCredits, formatMillionKm } from "../format"; import { errorMessage, useGameAction, useLoadedPlayer } from "../state/actions"; const LANDING_LABELS = { vacuum: "Vacuum", atmospheric: "Atmospheric", hardened: "Hardened" }; /** Ship models for sale; new ships appear at Earth (Step 9.8). */ export function Market() { const state = useLoadedPlayer(); const buy = useGameAction("buyShip"); return (

Market

New ships are delivered to Earth with no pilot.

{buy.isError && (

{errorMessage(buy.error)}

)} {buy.isSuccess && (

{buy.data.ship.name} is waiting at Earth.

)}
); }