diff --git a/frontend/src/components/CompletedPairRoom/ReferenceCard/CategoryManagementModal/CategoryItem/CategoryItem.styles.ts b/frontend/src/components/CompletedPairRoom/ReferenceCard/CategoryManagementModal/CategoryItem/CategoryItem.styles.ts index f081e5cf..de3a3ea4 100644 --- a/frontend/src/components/CompletedPairRoom/ReferenceCard/CategoryManagementModal/CategoryItem/CategoryItem.styles.ts +++ b/frontend/src/components/CompletedPairRoom/ReferenceCard/CategoryManagementModal/CategoryItem/CategoryItem.styles.ts @@ -3,42 +3,32 @@ import styled from 'styled-components'; export const Layout = styled.div` display: flex; justify-content: space-between; - gap: 1rem; + align-items: center; + gap: 2rem; width: 100%; `; export const Container = styled.div` display: flex; - flex-direction: column; - gap: 0.3rem; + align-items: center; + gap: 1rem; width: 100%; - height: 6rem; - - cursor: pointer; img { width: 2rem; + height: 2rem; } `; -export const ItemLayout = styled.div` - display: flex; - align-items: center; - gap: 1rem; - - width: 100%; -`; - export const Item = styled.li<{ $isChecked: boolean }>` display: flex; - justify-content: space-between; align-items: center; width: 100%; height: 4.4rem; - padding: 0 1rem; + padding: 0 1.2rem; border: 1px solid ${({ theme }) => theme.color.black[50]}; border-radius: 0.5rem; @@ -52,9 +42,4 @@ export const Item = styled.li<{ $isChecked: boolean }>` background-color: ${({ theme }) => theme.color.primary[700]}; color: ${({ theme }) => theme.color.black[10]}; } - - &:active { - background-color: ${({ theme }) => theme.color.primary[800]}; - color: ${({ theme }) => theme.color.black[10]}; - } `; diff --git a/frontend/src/components/CompletedPairRoom/ReferenceCard/CategoryManagementModal/CategoryItem/CategoryItem.tsx b/frontend/src/components/CompletedPairRoom/ReferenceCard/CategoryManagementModal/CategoryItem/CategoryItem.tsx index 5d9d9985..4724a97b 100644 --- a/frontend/src/components/CompletedPairRoom/ReferenceCard/CategoryManagementModal/CategoryItem/CategoryItem.tsx +++ b/frontend/src/components/CompletedPairRoom/ReferenceCard/CategoryManagementModal/CategoryItem/CategoryItem.tsx @@ -15,29 +15,21 @@ interface CategoryItemProps { const CategoryItem = ({ closeModal, categoryName, categoryId, isChecked, handleSelectCategory }: CategoryItemProps) => { const { addToast } = useToastStore(); + const handleCategoryClick = (event: React.MouseEvent) => { + if (isChecked) return; + + handleSelectCategory(event.currentTarget.id); + addToast({ status: 'SUCCESS', message: `${categoryName}가 선택되었어요.` }); + closeModal(); + }; + return ( - - ) => { - if (event.currentTarget.id === '카테고리') return; - if (isChecked) return; - handleSelectCategory(event.currentTarget.id); - addToast({ status: 'SUCCESS', message: `${categoryName}가 선택되었어요.` }); - - closeModal(); - }} - > - {isChecked - - -

{categoryName}

-
-
+ + {isChecked + +

{categoryName}

+
); diff --git a/frontend/src/components/CompletedPairRoom/ReferenceCard/CategoryManagementModal/CategoryManagementModal.tsx b/frontend/src/components/CompletedPairRoom/ReferenceCard/CategoryManagementModal/CategoryManagementModal.tsx index 99506ed1..971603ff 100644 --- a/frontend/src/components/CompletedPairRoom/ReferenceCard/CategoryManagementModal/CategoryManagementModal.tsx +++ b/frontend/src/components/CompletedPairRoom/ReferenceCard/CategoryManagementModal/CategoryManagementModal.tsx @@ -1,5 +1,3 @@ -import { FaFilter } from 'react-icons/fa'; - import { Modal } from '@/components/common/Modal'; import CategoryItem from '@/components/CompletedPairRoom/ReferenceCard/CategoryManagementModal/CategoryItem/CategoryItem'; import { Category } from '@/components/PairRoom/ReferenceCard/ReferenceCard.type'; @@ -26,7 +24,6 @@ const CategoryManagementModal = ({ -

카테고리 선택

diff --git a/frontend/src/components/CompletedPairRoom/RetrospectButton/RetrospectButton.tsx b/frontend/src/components/CompletedPairRoom/RetrospectButton/RetrospectButton.tsx index 76b0bf1a..25a90eeb 100644 --- a/frontend/src/components/CompletedPairRoom/RetrospectButton/RetrospectButton.tsx +++ b/frontend/src/components/CompletedPairRoom/RetrospectButton/RetrospectButton.tsx @@ -1,7 +1,6 @@ import { useNavigate } from 'react-router-dom'; import Button from '@/components/common/Button/Button'; -import Spinner from '@/components/common/Spinner/Spinner'; import useUserStore from '@/stores/userStore'; @@ -22,10 +21,17 @@ const RetrospectButton = ({ accessCode }: RetrospectButtonProps) => { const { isUserInPairRoom, isUserInPairRoomFetching } = useGetUserIsInPairRoom(accessCode); const { isUserRetrospectExist, isUserRetrospectExistsFetching } = useGetUserRetrospectExists(accessCode); - const isLoading = isUserInPairRoomFetching || isUserRetrospectExistsFetching; - if (isLoading) { - return ; + if (isUserInPairRoomFetching || isUserRetrospectExistsFetching) { + return ( + + + 잠시만 기다려주세요... + + ); } + if (userStatus !== 'SIGNED_IN' || !isUserInPairRoom) return ( diff --git a/frontend/src/components/MyPage/PairRoomButton/PairRoomButton.styles.ts b/frontend/src/components/MyPage/PairRoomButton/PairRoomButton.styles.ts index b94b3ee9..bf36c064 100644 --- a/frontend/src/components/MyPage/PairRoomButton/PairRoomButton.styles.ts +++ b/frontend/src/components/MyPage/PairRoomButton/PairRoomButton.styles.ts @@ -71,7 +71,7 @@ export const RoleTextContainer = styled.div` width: 50%; `; -export const RoleText = styled.p<{ $status: PairRoomStatus }>` +export const RoleText = styled.p<{ $status: PairRoomStatus; $color: 'secondary' | 'primary' }>` display: flex; align-items: center; gap: 1rem; @@ -81,7 +81,8 @@ export const RoleText = styled.p<{ $status: PairRoomStatus }>` transition: color 0.7s ease; span { - color: ${({ $status, theme }) => ($status === 'IN_PROGRESS' ? theme.color.secondary[600] : theme.color.black[70])}; + color: ${({ $status, theme, $color }) => + $status === 'IN_PROGRESS' ? theme.color[$color][600] : theme.color.black[70]}; font-size: ${({ theme }) => theme.fontSize.lg}; font-weight: ${({ theme }) => theme.fontWeight.medium}; diff --git a/frontend/src/components/MyPage/PairRoomButton/PairRoomButton.tsx b/frontend/src/components/MyPage/PairRoomButton/PairRoomButton.tsx index 6f20107a..e40a560b 100644 --- a/frontend/src/components/MyPage/PairRoomButton/PairRoomButton.tsx +++ b/frontend/src/components/MyPage/PairRoomButton/PairRoomButton.tsx @@ -47,11 +47,11 @@ const PairRoomButton = ({ driver, navigator, status, accessCode }: PairRoomButto - + 드라이버 {driver} - + 내비게이터 {navigator} diff --git a/frontend/src/components/MyPage/PairRoomButton/RetrospectButton.tsx b/frontend/src/components/MyPage/PairRoomButton/RetrospectButton.tsx index e2b67514..a04ba591 100644 --- a/frontend/src/components/MyPage/PairRoomButton/RetrospectButton.tsx +++ b/frontend/src/components/MyPage/PairRoomButton/RetrospectButton.tsx @@ -46,7 +46,7 @@ const RetrospectButton = ({ accessCode, answer }: RetrospectButtonProps) => { - + {accessCode} {splitAnswer(answer)} diff --git a/frontend/src/components/PairRoom/ReferenceCard/CategoryManagementModal/CategoryItem/CategoryItem.styles.ts b/frontend/src/components/PairRoom/ReferenceCard/CategoryManagementModal/CategoryItem/CategoryItem.styles.ts index a3a8add3..ec03bdbe 100644 --- a/frontend/src/components/PairRoom/ReferenceCard/CategoryManagementModal/CategoryItem/CategoryItem.styles.ts +++ b/frontend/src/components/PairRoom/ReferenceCard/CategoryManagementModal/CategoryItem/CategoryItem.styles.ts @@ -48,6 +48,7 @@ export const Item = styled.li<{ $isChecked: boolean }>` color: ${({ theme }) => theme.color.black[10]}; } `; + export const CustomInputMessage = css` top: 4rem; diff --git a/frontend/src/components/common/Spinner/Spinner.styles.ts b/frontend/src/components/common/Spinner/Spinner.styles.ts index 5fb8a6b9..9a5f61f6 100644 --- a/frontend/src/components/common/Spinner/Spinner.styles.ts +++ b/frontend/src/components/common/Spinner/Spinner.styles.ts @@ -24,8 +24,8 @@ export const Layout = styled.div` justify-content: center; align-items: center; - width: 100%; - height: 100%; + width: fit-content; + height: fit-content; `; export const Spinner = styled.div<{ $size: SpinnerSize }>`