Skip to content

Commit

Permalink
update: Sat 07 Sep 2024 18:02:06 CEST
Browse files Browse the repository at this point in the history
  • Loading branch information
cophilot committed Sep 7, 2024
1 parent 65cc98b commit 01fdf9a
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
3 changes: 3 additions & 0 deletions src/api/BoardScorePage/BoardScorePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ interface BoardScoreTableProps {
children?: any;
onCellChange?: (rowIndex: number, playerIndex: number, value: any) => void;
logo?: JSX.Element;
afterTableElement?: JSX.Element;
isDarkModeEnabled?: boolean;
}

Expand All @@ -27,6 +28,7 @@ export default function BoardScorePage({
children,
onCellChange,
logo,
afterTableElement,
isDarkModeEnabled = false,
}: BoardScoreTableProps): JSX.Element {
const navigate = useNavigate();
Expand Down Expand Up @@ -75,6 +77,7 @@ export default function BoardScorePage({
definition={definition}
gameSettings={settings}
playerSize={playerSize}></BoardScoreTable>
{afterTableElement}
{showHelpButton && (
<button
className="btn selected nav-btn print-hide"
Expand Down
11 changes: 9 additions & 2 deletions src/components/GameView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,19 @@ import Logo from './Logo';

interface GameViewProps {
definition: any;
afterTabelElement?: JSX.Element;
}

export default function GameView({ definition }: GameViewProps): JSX.Element {
export default function GameView({
definition,
afterTabelElement,
}: GameViewProps): JSX.Element {
const logo = <Logo size={100} bgColor={definition.bgColor || '#fff'} />;
return (
<BoardScorePage definition={definition} logo={logo}>
<BoardScorePage
definition={definition}
logo={logo}
afterTableElement={afterTabelElement}>
<By />
</BoardScorePage>
);
Expand Down
7 changes: 6 additions & 1 deletion src/games/sea-salt-paper/View.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,10 @@ import GameView from '../../components/GameView';
import getDefinition from './definition';

export default function SeaSaltPaperView() {
return <GameView definition={getDefinition()} />;
const roundBtn = (
<button className="btn selected nav-btn print-hide">Save Round</button>
);
return (
<GameView definition={getDefinition()} afterTabelElement={roundBtn} />
);
}

0 comments on commit 01fdf9a

Please sign in to comment.