diff --git a/packages/web/src/components/Chat/Header/SideMenu.tsx b/packages/web/src/components/Chat/Header/SideMenu.tsx index f9808ef39..cfdafcf09 100644 --- a/packages/web/src/components/Chat/Header/SideMenu.tsx +++ b/packages/web/src/components/Chat/Header/SideMenu.tsx @@ -90,6 +90,8 @@ const SideMenu = ({ roomInfo, isOpen, setIsOpen }: SideMenuProps) => { const onClickCallTaxi = useCallback(() => setIsOpenCallTaxi(true), []); const onClickReport = useCallback(() => setIsOpenReport(true), []); + const isAlone = roomInfo.part.length === 1; + const styleBackground = { position: "absolute" as any, top: 0, @@ -192,8 +194,12 @@ const SideMenu = ({ roomInfo, isOpen, setIsOpen }: SideMenuProps) => { - - + {!isAlone && ( + <> + + + + )}
diff --git a/packages/web/src/components/Chat/MessagesBody/MessageSet/index.tsx b/packages/web/src/components/Chat/MessagesBody/MessageSet/index.tsx index ab62a70a1..06864f170 100644 --- a/packages/web/src/components/Chat/MessagesBody/MessageSet/index.tsx +++ b/packages/web/src/components/Chat/MessagesBody/MessageSet/index.tsx @@ -70,6 +70,7 @@ const MessageSet = ({ chats, layoutType, roomInfo }: MessageSetProps) => { const authorName = "authorName" in chats?.[0] ? chats?.[0].authorName : ""; const isBot = authorId === "bot"; + const isAlone = roomInfo.part.length === 1; const style = { position: "relative" as any, @@ -148,8 +149,11 @@ const MessageSet = ({ chats, layoutType, roomInfo }: MessageSetProps) => {
{authorId !== userOid && (
!isBot && onClickProfileImage()} + css={{ + ...styleProfile, + cursor: !isBot && !isAlone ? "pointer" : undefined, + }} + onClick={() => !isBot && !isAlone && onClickProfileImage()} > {isBot ? ( diff --git a/packages/web/src/components/ModalPopup/Body/BodyRoomSelection.tsx b/packages/web/src/components/ModalPopup/Body/BodyRoomSelection.tsx index 306f1a2cc..e37671da8 100644 --- a/packages/web/src/components/ModalPopup/Body/BodyRoomSelection.tsx +++ b/packages/web/src/components/ModalPopup/Body/BodyRoomSelection.tsx @@ -125,6 +125,12 @@ const BodyRoomSelection = ({ roomInfo }: BodyRoomSelectionProps) => { const isDepart = useIsTimeOver(dayServerToClient(roomInfo.time)); // 방 출발 여부 const requestJoin = useCallback(async () => { + if (isAlreadyPart) { + // 이미 참여 중인 방에서 버튼을 누르면 API 호출 관련 로직을 건너뛰고 해당 방으로 이동합니다. + history.push(`/myroom/${roomInfo._id}`); + return; + } + // 여기부터는 이미 참여 중인 방이 아닌 경우의 로직입니다. if (onCall.current) return; onCall.current = true; await axios({ @@ -204,7 +210,7 @@ const BodyRoomSelection = ({ roomInfo }: BodyRoomSelectionProps) => { {isLogin || isRoomFull || isDepart ? (