From a43fabb522ab0be2a95fd37cc4800daefd28b541 Mon Sep 17 00:00:00 2001 From: llddang Date: Thu, 11 Jul 2024 17:38:19 +0900 Subject: [PATCH 1/2] =?UTF-8?q?api:=20=ED=8C=80=20=EB=9E=AD=ED=82=B9=20?= =?UTF-8?q?=ED=98=B8=EC=B6=9C=20api=20=EC=97=90=EB=9F=AC=20=EC=B2=98?= =?UTF-8?q?=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #282 --- src/containers/main/TeamRankSlider/index.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/containers/main/TeamRankSlider/index.tsx b/src/containers/main/TeamRankSlider/index.tsx index 379696ca..677b21e5 100644 --- a/src/containers/main/TeamRankSlider/index.tsx +++ b/src/containers/main/TeamRankSlider/index.tsx @@ -28,6 +28,7 @@ const TeamRankSlider = () => { useEffect(() => { getTeams().then((res) => { + if (!res.ok) return; const teams = res.body.slice(0, 10).map((team: TeamRank, idx: number) => { return { ...team, rank: idx + 1 }; }); From 7826dab001e8208fec3519ed929ece9499b39fd7 Mon Sep 17 00:00:00 2001 From: llddang Date: Thu, 11 Jul 2024 17:46:09 +0900 Subject: [PATCH 2/2] =?UTF-8?q?design:=20=EC=83=9D=EC=84=B1=EB=90=9C=20?= =?UTF-8?q?=ED=8C=80=EC=9D=B4=20=EC=97=86=EC=9D=84=20=EB=95=8C=20=EB=9C=A8?= =?UTF-8?q?=EB=8A=94=20=EB=AC=B8=EA=B5=AC=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #282 --- src/containers/main/TeamRankSlider/index.tsx | 22 ++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/src/containers/main/TeamRankSlider/index.tsx b/src/containers/main/TeamRankSlider/index.tsx index 677b21e5..1650c53d 100644 --- a/src/containers/main/TeamRankSlider/index.tsx +++ b/src/containers/main/TeamRankSlider/index.tsx @@ -1,6 +1,8 @@ +/* eslint-disable react/jsx-props-no-spreading */ + 'use client'; -import { Box, Flex } from '@chakra-ui/react'; +import { Box, Flex, Text } from '@chakra-ui/react'; import { useRouter } from 'next/navigation'; import { useEffect, useState } from 'react'; import { Swiper, SwiperSlide, SwiperClass } from 'swiper/react'; @@ -8,6 +10,7 @@ import { Swiper, SwiperSlide, SwiperClass } from 'swiper/react'; import 'swiper/css'; import { getTeams } from '@/app/api/team'; +import textStyles from '@/theme/foundations/textStyles'; import { TeamRank } from '@/types'; import TeamCard from '../TeamCard'; @@ -38,6 +41,22 @@ const TeamRankSlider = () => { return ( + {teamRank.length === 0 && ( + + + 아직 생성된 팀이 없습니다. + + + )} { ))} - {teamRank.map((team, idx) => (