Skip to content

Commit

Permalink
fix: 크루 랭킹 페이지 ui 깨지는 버그 수정 (#389)
Browse files Browse the repository at this point in the history
  • Loading branch information
dlwl98 authored Nov 28, 2023
1 parent 1384623 commit aedc819
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import styled from '@emotion/styled';

import { Avatar } from '@components/Avatar';
import { Flex } from '@components/shared/Flex';

export const ContentWrapper = styled.div`
Expand All @@ -10,3 +11,7 @@ export const ContentWrapper = styled.div`
export const InfoContainer = styled(Flex)`
width: 100%;
`;

export const CrewAvatar = styled(Avatar)`
min-width: 60px;
`;
11 changes: 7 additions & 4 deletions src/components/RankingModalContent/RankingModalContent.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { Avatar } from '@components/Avatar';
import { InfoItem } from '@components/InfoItem';
import { Button } from '@components/shared/Button';
import { Flex } from '@components/shared/Flex';
Expand All @@ -11,7 +10,11 @@ import CrewMember from '@assets/gameMember.svg?react';
import Map from '@assets/map.svg?react';
import Tooltip from '@assets/tooltip.svg?react';

import { ContentWrapper, InfoContainer } from './RankingModalContent.styles';
import {
ContentWrapper,
CrewAvatar,
InfoContainer,
} from './RankingModalContent.styles';

type RankingModalContentProps = {
profileImageUrl: string;
Expand Down Expand Up @@ -46,9 +49,9 @@ export const RankingModalContent = ({
<ContentWrapper>
<Flex direction="column" gap={16}>
<Flex gap={10}>
<Avatar src={profileImageUrl} size={60} radius="5px" />
<CrewAvatar src={profileImageUrl} size={60} radius="5px" />
<Flex direction="column" justify="space-around">
<Text size={24} weight={700} nowrap>
<Text size={24} weight={700} ellipsis={1}>
{name}
</Text>
<Text size={12} weight={500} nowrap>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import styled from '@emotion/styled';

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

Expand All @@ -13,3 +14,7 @@ export const RankText = styled(Text)`
width: 1.3rem;
text-align: end;
`;

export const CrewAvatar = styled(Avatar)`
min-width: 40px;
`;
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import { Avatar } from '@components/Avatar';
import { Flex } from '@components/shared/Flex';
import { Text } from '@components/shared/Text';

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

import { RankText, RankingItemWrapper } from './RankingItem.styles';
import { CrewAvatar, RankText, RankingItemWrapper } from './RankingItem.styles';
import { getRankingItemBackgroundColor } from './getRankingItemBackgroundColor';

type RankingItemProps = {
Expand Down Expand Up @@ -33,8 +32,8 @@ export const RankingItem = ({
<RankText size={14} nowrap>
{rank}
</RankText>
<Avatar size={40} src={profilImageUrl} radius="5px" />
<Text size={16} weight={700} nowrap>
<CrewAvatar size={40} src={profilImageUrl} radius="5px" />
<Text size={16} weight={700} ellipsis={1}>
{name}
</Text>
</Flex>
Expand Down

0 comments on commit aedc819

Please sign in to comment.