From 67ad36bced873e0991d1519533b1d0fd12f178ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=B2=9C=EC=A7=80=EC=9C=A4?= <70828192+cheonjiyun@users.noreply.github.com> Date: Sun, 15 Dec 2024 22:39:51 +0900 Subject: [PATCH] =?UTF-8?q?Feature/148=20=EC=B1=84=ED=8C=85=EC=97=90?= =?UTF-8?q?=EC=84=9C=20=EC=A7=81=EC=97=85=20=EB=B3=B4=EC=97=AC=EC=A3=BC?= =?UTF-8?q?=EA=B8=B0=20(#150)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: 글씨 제거 * feat: 채팅에서 직업 찾아서 보여주기 --- src/components/chat/ChatGroup.tsx | 7 ++++++- src/pages/Night.tsx | 1 - src/util/job.ts | 5 +++++ 3 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 src/util/job.ts diff --git a/src/components/chat/ChatGroup.tsx b/src/components/chat/ChatGroup.tsx index 47fc9e4..bdb21d7 100644 --- a/src/components/chat/ChatGroup.tsx +++ b/src/components/chat/ChatGroup.tsx @@ -1,9 +1,12 @@ /** @jsxImportSource @emotion/react */ import { css } from '@emotion/react'; import { forwardRef } from 'react'; +import { useRecoilState } from 'recoil'; +import { roomInfoState } from '../../recoil/roominfo/atom'; import { VariablesCSS } from '../../styles/VariablesCSS'; import { Chat } from '../../type'; +import { getPlayerJob } from '../../util/job'; import PlayerChat from '../player/PlayerChat'; import ChatMessage from './ChatMessage'; @@ -15,9 +18,11 @@ interface PropsType { export default forwardRef(function ChatGroup(props: PropsType, ref: any) { const { chats } = props; + const [roomInfo] = useRecoilState(roomInfoState); + return (
{chats[0].name}
{chats.map((chat, idx) => ( diff --git a/src/pages/Night.tsx b/src/pages/Night.tsx index 7aa2c68..e033b59 100644 --- a/src/pages/Night.tsx +++ b/src/pages/Night.tsx @@ -39,7 +39,6 @@ export default function Night({ statusType, publishSkill, mafiaSkillPlayer }: Pr ) : (