главный экран

This commit is contained in:
azykov@mail.ru
2026-09-04 17:22:49 +03:00
parent 03a7552b9a
commit 982bbce813
5 changed files with 129 additions and 2 deletions
+5 -1
View File
@@ -5,9 +5,10 @@ import PixelSprite from './PixelSprite';
interface Props {
store: GameStore;
onExitToMenu: () => void;
}
function Topbar({ store }: Props) {
function Topbar({ store, onExitToMenu }: Props) {
return (
<div className="topbar">
<h1 className="topbar__title">Forest</h1>
@@ -27,6 +28,9 @@ function Topbar({ store }: Props) {
<PixelSprite pixels={COIN_SPRITE} size={24} />
<span>{store.inventory.coins.toFixed(1)}</span>
</div>
<button type="button" className="exit-menu-btn" onClick={onExitToMenu}>
Выйти в меню
</button>
</div>
);
}