Skip to content

Commit

Permalink
revealStatus->isRevealed
Browse files Browse the repository at this point in the history
  • Loading branch information
kizahasi committed Feb 15, 2025
1 parent d74e35d commit 34630a9
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 394 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const useFindCardImage = (
return targetCard;
}
const isTopCardFace =
targetCard.value.value.revealStatus.type === 'face' ||
targetCard.value.value.isRevealed ||
(myUserUid != null && state.revealedTo.includes(myUserUid));
const imageResult = isTopCardFace ? face : back;
if (imageResult.isError) {
Expand Down
20 changes: 4 additions & 16 deletions apps/web-server/src/mocks/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -420,10 +420,7 @@ export const createMockRoom = (params: CreateMockRoomParams): State => {
},
},
name: 'card-1-name',
revealStatus: {
type: 'face',
revealedBy: { type: 'revealedAtCreate' },
},
isRevealed: true,
},
'card-2-key': {
$v: 1,
Expand All @@ -447,10 +444,7 @@ export const createMockRoom = (params: CreateMockRoomParams): State => {
},
},
name: 'card-1-name',
revealStatus: {
type: 'face',
revealedBy: { type: 'client', userUid: anotherPlayerUserUid },
},
isRevealed: true,
},
},
revealedTo: [],
Expand Down Expand Up @@ -494,10 +488,7 @@ export const createMockRoom = (params: CreateMockRoomParams): State => {
},
},
name: 'card-1-name',
revealStatus: {
type: 'face',
revealedBy: { type: 'client', userUid: myUserUid },
},
isRevealed: true,
},
'card-2-key': {
$v: 1,
Expand All @@ -521,10 +512,7 @@ export const createMockRoom = (params: CreateMockRoomParams): State => {
},
},
name: 'card-1-name',
revealStatus: {
type: 'face',
revealedBy: { type: 'client', userUid: anotherPlayerUserUid },
},
isRevealed: true,
},
},
revealedTo: [],
Expand Down

This file was deleted.

Loading

0 comments on commit 34630a9

Please sign in to comment.