- Implement BattleshipBoard with phase-based rendering (placement/battle) - Add PlacementGrid for ship placement interaction - Add ShotGrid for firing UI with turn validation - Integrate match metadata (pX_placed, pX_ready, phase) - Connect UI to Nakama sendMatchData (place + shoot actions) - Add real-time board rendering for ships and shots - Add status line, turn handling, and winner display - Ensure compatibility with new backend ApplyMove/ApplyPlacement logic
25 lines
481 B
TypeScript
25 lines
481 B
TypeScript
import React from "react";
|
|
import { motion } from "framer-motion";
|
|
|
|
interface StatusBarProps {
|
|
text: string;
|
|
}
|
|
|
|
export default function StatusBar({ text }: StatusBarProps) {
|
|
return (
|
|
<motion.div
|
|
key={text}
|
|
initial={{ opacity: 0, y: -6 }}
|
|
animate={{ opacity: 1, y: 0 }}
|
|
transition={{ duration: 0.25 }}
|
|
style={{
|
|
marginBottom: 8,
|
|
fontSize: "18px",
|
|
textAlign: "center",
|
|
}}
|
|
>
|
|
{text}
|
|
</motion.div>
|
|
);
|
|
}
|