diff --git a/chess/frontend/src/components/LobbyList.tsx b/chess/frontend/src/components/LobbyList.tsx index d2d05dde..46dd5f2e 100644 --- a/chess/frontend/src/components/LobbyList.tsx +++ b/chess/frontend/src/components/LobbyList.tsx @@ -119,7 +119,7 @@ const LobbyList: React.FC = ({ fullWidth onClick={() => onLobbySelect(lobby)} > - {actionMap[lobby.lobby_state]} + {actionMap[lobby.lobby_state as LobbyStatus]} } /> diff --git a/chess/frontend/src/paima/types.d.ts b/chess/frontend/src/paima/types.d.ts index fac42159..be0cd9cf 100644 --- a/chess/frontend/src/paima/types.d.ts +++ b/chess/frontend/src/paima/types.d.ts @@ -1,5 +1,6 @@ import type { Hash } from '@paima/sdk/utils'; -import type { BaseRoundStatus, LobbyState, LobbyStateQuery, LobbyStatus, NewLobby, UserLobby, UserStats } from '@chess/utils'; +import type { BaseRoundStatus, LobbyState, LobbyStateQuery, NewLobby, UserLobby, UserStats } from '@chess/utils'; +import type { LobbyStatus } from '@chess/db'; export interface RoundEnd { blocks: number; seconds: number; diff --git a/chess/utils/src/types.ts b/chess/utils/src/types.ts index 5d7ad707..23b6bc2d 100644 --- a/chess/utils/src/types.ts +++ b/chess/utils/src/types.ts @@ -15,6 +15,7 @@ type IGetBlockHeightsResult = { export type ConciseResult = 'w' | 't' | 'l'; export type ExpandedResult = 'win' | 'tie' | 'loss'; export type MatchResult = [ConciseResult, ConciseResult]; +export { LobbyStatus } from '@chess/db'; export interface MatchWinnerResponse { match_status?: LobbyStatus;