From a5772dca74d732a816ff00f0d6325f4890b793b0 Mon Sep 17 00:00:00 2001 From: thsk3 Date: Tue, 1 Oct 2024 16:11:57 +0900 Subject: [PATCH] =?UTF-8?q?Refactor:=20PCard=20=EC=BB=B4=ED=8F=AC=EB=84=8C?= =?UTF-8?q?=ED=8A=B8=20props=20=EC=88=98=EC=A0=95=20-=20rank=20=EC=98=B5?= =?UTF-8?q?=EC=85=94=EB=84=90=20=EA=B0=92=EC=9C=BC=EB=A1=9C=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/PCard/index.tsx | 6 +++--- src/components/PCardSlider/index.tsx | 11 +++-------- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/src/components/PCard/index.tsx b/src/components/PCard/index.tsx index 83457f7..9416b5a 100644 --- a/src/components/PCard/index.tsx +++ b/src/components/PCard/index.tsx @@ -6,13 +6,13 @@ import { CommonResponseType } from '@/types/apis'; interface PCardProps { pInfo: Pick; width?: string; - rank?: number | null; + rank?: number; } -export const PCard = ({ pInfo, width = '225px', rank = null }: PCardProps) => { +export const PCard = ({ pInfo, width = '225px', rank }: PCardProps) => { return ( - + {pInfo.prfnm} {pInfo.fcltynm} diff --git a/src/components/PCardSlider/index.tsx b/src/components/PCardSlider/index.tsx index 99664d7..1e997b4 100644 --- a/src/components/PCardSlider/index.tsx +++ b/src/components/PCardSlider/index.tsx @@ -7,14 +7,14 @@ import { PCard } from '@/components/PCard'; interface PCardSliderProps { /** - * Omit 과 동일 + * Omit[] 과 동일 */ pList: Pick[]; width?: string; isRanked?: boolean; } -export const PCardSlider = ({ pList, width = '600px', isRanked = false }: PCardSliderProps) => { +export const PCardSlider = ({ pList, width = '100%', isRanked }: PCardSliderProps) => { const settings = { infinite: true, speed: 500, @@ -27,12 +27,7 @@ export const PCardSlider = ({ pList, width = '600px', isRanked = false }: PCardS {pList.map((perform, index) => { return ( - + ); })}