Skip to content

Commit

Permalink
Fix: 리스트 아이템 타입 프로퍼티 이름 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
ParkSohyunee committed Feb 12, 2024
1 parent e0baf4d commit 4bf31f4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/app/user/[userId]/_components/Card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export default function Card({ list, isOwner }: CardProps) {
{list.listItems.map((item) => (
<li key={item.id} className={styles.item}>
<span className={styles.rank}>
{item.ranking}
{item.rank}
{'.'}
</span>
<span className={styles.itemTitle}>{item.title}</span>
Expand Down
7 changes: 4 additions & 3 deletions src/lib/types/listType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ export interface ListDetailType {
collectCount: number;
viewCount: number;
}

// 리스트 전체 조회 타입
export interface AllListType {
cursorId: number;
Expand All @@ -98,9 +99,9 @@ export interface ListType {

export interface ItemType {
id: number;
ranking: number;
rank: number;
title: string;
comment?: string;
link?: string;
comment?: string; // 리스트 상세조회 타입에서 사용할때는 optional 여부 확인하기
link?: string; // 리스트 상세조회 타입에서 사용할때는 optional 여부 확인하기
imageUrl?: string;
}

0 comments on commit 4bf31f4

Please sign in to comment.