diff --git a/src/screens/Prologue.jsx b/src/screens/Prologue.jsx new file mode 100644 index 0000000..a31864d --- /dev/null +++ b/src/screens/Prologue.jsx @@ -0,0 +1,71 @@ +import { useState } from 'react' +import { BACKGROUNDS } from '../constants.js' + +// Prologue screen — shown on the 'Prologue' tab. +// If background_id is null: shows background selection UI. +// If background_id is set: shows read-only summary of chosen background. +// Props: +// state — current game state +// onSelectBackground(id) — called when player confirms a background + +export default function Prologue({ state, onSelectBackground }) { + const [selected, setSelected] = useState(null) + const chosen = BACKGROUNDS.find(b => b.id === state.background_id) || null + + // Read-only view — background already chosen + if (chosen) { + return ( +
{chosen.summary}
++ Your background shapes your starting parameters. This choice is permanent. +
+