главный экран
This commit is contained in:
@@ -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>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user