Skip to content

Commit

Permalink
fix: Crew, MatchItem ui 버그 수정 (#361)
Browse files Browse the repository at this point in the history
  • Loading branch information
dlwl98 authored Nov 27, 2023
1 parent 7fb20c8 commit 77add14
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
1 change: 1 addition & 0 deletions src/components/CrewItem/CrewItem.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export const CrewItemWrapper = styled(Flex)`
`;

export const CrewProfileImage = styled(Image)`
min-width: 82px;
border-radius: 8px;
`;

Expand Down
1 change: 1 addition & 0 deletions src/components/MatchItem/MatchItem.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export const MatchStatus = styled.div`
flex-direction: column;
background-color: ${({ theme }) => theme.PALETTE.GRAY_100};
padding: 10px;
min-width: 82px;
width: 82px;
height: 82px;
border-radius: 8px;
Expand Down
17 changes: 9 additions & 8 deletions src/components/MatchItem/MatchItem.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { PropsWithChildren } from 'react';
import { useNavigate } from 'react-router-dom';

import { Text } from '@components/shared/Text';

import { theme } from '@styles/theme';

import { PATH_NAME } from '@consts/pathName';
Expand All @@ -12,14 +14,12 @@ import { Avatar } from '../Avatar';
import { AvatarGroup } from '../AvatarGroup';
import {
MatchAddress,
MatchDate,
MatchDescription,
MatchDuration,
MatchItemInnerWrapper,
MatchItemWrapper,
MatchPlayerInfo,
MatchRecruitmentStatus,
MatchStartTime,
MatchStatus,
} from './MatchItem.styles';
import { BottomButton } from './components/BottomButton';
Expand All @@ -34,7 +34,6 @@ type MatchItemProps = {
membersProfileImageUrls: string[];
} & PropsWithChildren;

/** TODO: Text 컴포넌트로 대체해야함 */
const MatchItem = ({
children,
matchId,
Expand All @@ -54,22 +53,24 @@ const MatchItem = ({
>
<MatchStatus>
{isGameEnded(startTime, timeMinutes) ? (
<MatchStartTime>종료</MatchStartTime>
<Text size={20} weight={700} nowrap>
종료
</Text>
) : (
<>
<MatchStartTime>
<Text size={20} weight={700} nowrap>
{`${startTime.toTimeString().slice(0, 5)}`}
</MatchStartTime>
</Text>
<MatchDuration>{`${timeMinutes / 60}h`}</MatchDuration>
</>
)}
</MatchStatus>
<MatchDescription>
<MatchDate>
<Text size={20} nowrap>
{`${startTime.toLocaleDateString()} ${
WEEKDAY[startTime.getDay()]
}요일`}
</MatchDate>
</Text>
<MatchAddress>{mainAddress}</MatchAddress>
<MatchPlayerInfo>
<AvatarGroup
Expand Down
1 change: 1 addition & 0 deletions src/pages/ChatRoomListPage/ChatRoomListPage.style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ export const DateText = styled(Text)`
`;

export const ChatMatchStatus = styled(MatchStatus)`
min-width: 40px;
width: 40px;
height: 40px;
`;
Expand Down

0 comments on commit 77add14

Please sign in to comment.