Skip to content

Commit

Permalink
Convert ThreatModal to TypeScript
Browse files Browse the repository at this point in the history
Signed-off-by: Johannes Loher <[email protected]>
  • Loading branch information
ghost91- committed Apr 26, 2024
1 parent c282c01 commit d1bc83e
Show file tree
Hide file tree
Showing 6 changed files with 298 additions and 380 deletions.
1 change: 0 additions & 1 deletion src/client/components/board/board.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,6 @@ const Board: FC<BoardProps> = ({
/>
<Threatbar
G={G}
ctx={ctx}
playerID={playerID}
model={model}
names={names}
Expand Down
3 changes: 0 additions & 3 deletions src/client/components/threatbar/threatbar.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { GameMode } from '../../../utils/GameMode';
import React from 'react';
import Threatbar from './threatbar';
import type { GameState } from '../../../game/gameState';
import type { Ctx } from 'boardgame.io';
import { ModelType } from '../../../utils/constants';
import type { ThreatDragonModel } from '../../../types/ThreatDragonModel';

Expand Down Expand Up @@ -106,7 +105,6 @@ describe('<Threatbar>', () => {
render(
<Threatbar
G={G}
ctx={{} as Ctx}
moves={{}}
active
names={[]}
Expand Down Expand Up @@ -179,7 +177,6 @@ describe('<Threatbar>', () => {
render(
<Threatbar
G={G}
ctx={{} as Ctx}
moves={{}}
active
names={[]}
Expand Down
4 changes: 1 addition & 3 deletions src/client/components/threatbar/threatbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,12 @@ type ThreatbarProps = {
active: boolean;
names: string[];
isInThreatStage: boolean;
} & Pick<BoardProps<GameState>, 'G' | 'ctx' | 'moves' | 'playerID'>;
} & Pick<BoardProps<GameState>, 'G' | 'moves' | 'playerID'>;

const Threatbar: FC<ThreatbarProps> = ({
playerID,
model,
G,
ctx,
moves,
active,
names,
Expand Down Expand Up @@ -220,7 +219,6 @@ const Threatbar: FC<ThreatbarProps> = ({
<ThreatModal
isOpen={G.threat.modal}
G={G}
ctx={ctx}
playerID={playerID}
moves={moves}
names={names}
Expand Down
264 changes: 0 additions & 264 deletions src/client/components/threatmodal/threatmodal.jsx

This file was deleted.

Loading

0 comments on commit d1bc83e

Please sign in to comment.