Skip to content

Commit

Permalink
Merge pull request #29 from SkyEye-FAST/patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
XxLittleCxX authored Jul 27, 2021
2 parents 2a4b23c + 4d08fd1 commit f618bd1
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions packages/web/src/pages/room.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -127,13 +127,13 @@ const RoomPage = () => {
setTimeMax(10);
if (data.data === 'skipped') {
answerChatRef.current = [...answerChatRef.current, {
sender: <span style={{ color: 'yellowgreen' }}>{data.sender}</span>,
data: <span style={{ color: 'yellowgreen' }}>错过了他的回合</span>,
sender: <span style={{ color: '#ff9900' }}>{data.sender}</span>,
data: <span style={{ color: '#ff9900' }}>错过了他的回合</span>,
}];
} else {
answerChatRef.current = [...answerChatRef.current, {
sender: <span style={{ color: 'green' }}>正确答案</span>,
data: <span style={{ color: 'green' }}>{data.data}</span>,
sender: <span style={{ color: '#207f4c' }}>正确答案</span>,
data: <span style={{ color: '#207f4c' }}>{data.data}</span>,
}];
}
setAnswerChat(answerChatRef.current);
Expand All @@ -153,7 +153,7 @@ const RoomPage = () => {
type chatKey = keyof typeof gameChatMap;
if (Object.keys(gameInfoMap).includes(data.data)) {
answerChatRef.current = [...answerChatRef.current, {
data: <span style={{ color: 'blue' }}>{gameInfoMap[data.data as infoKey]}</span>,
data: <span style={{ color: '#2376b7' }}>{gameInfoMap[data.data as infoKey]}</span>,
}];
setAnswerChat(answerChatRef.current);
} else if (Object.keys(gameChatMap).includes(data.data)) {
Expand All @@ -169,8 +169,8 @@ const RoomPage = () => {
SuccessSound.play();
if (data.data) {
answerChatRef.current = [...answerChatRef.current, {
sender: <span style={{ color: 'green' }}>{player?.username}</span>,
data: <span style={{ color: 'green' }}>猜对了</span>,
sender: <span style={{ color: '#207f4c' }}>{player?.username}</span>,
data: <span style={{ color: '#207f4c' }}>猜对了</span>,
}];
setAnswerChat(answerChatRef.current);
}
Expand Down

1 comment on commit f618bd1

@vercel
Copy link

@vercel vercel bot commented on f618bd1 Jul 27, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.