Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

지도 페이지 게스트 매치가 없는 경우에 대한 처리 #386

Merged
merged 1 commit into from
Nov 28, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions src/pages/MapPage/GamesNearInMap.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import styled from '@emotion/styled';

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

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

import { Game } from '@type/models';

import { getGameStartDate } from '@utils/domain';
Expand Down Expand Up @@ -32,7 +35,13 @@ export const GamesNearInMap = ({
<Text size={20} weight={700}>
내 근처 게스트 매치
</Text>
{games &&
{games && games.length === 0 ? (
<Flex justify="center" gap={16}>
<Text size={theme.FONT_SIZE.XS} weight={300}>
근처에 게스트 매치가 없습니다.
</Text>
</Flex>
) : (
games.map((game) => {
const membersProfileImageUrls = game.members.map(
(member) => member.profileImageUrl
Expand All @@ -53,7 +62,8 @@ export const GamesNearInMap = ({
setPosition={setPosition}
/>
);
})}
})
)}
</PageContent>
</PageLayout>
);
Expand Down
Loading