From ccf8a4a79cf5cf88aa35747fd5fa97045fe1f6f4 Mon Sep 17 00:00:00 2001 From: ashleysyheo Date: Mon, 26 Jun 2023 22:15:56 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20api=20=EB=B3=80=EA=B2=BD=EC=82=AC?= =?UTF-8?q?=ED=95=AD=20=EB=B0=98=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Rulu --- .../MypagePage/UserProfile/UserProfile.tsx | 2 +- src/mock/userData.ts | 17 ++++++++++++++++- src/types/common/bookmarkTypes.ts | 1 + src/types/common/mypageTypes.ts | 3 ++- 4 files changed, 20 insertions(+), 3 deletions(-) diff --git a/src/components/pages/MypagePage/UserProfile/UserProfile.tsx b/src/components/pages/MypagePage/UserProfile/UserProfile.tsx index 8d99ec41..a7b68420 100644 --- a/src/components/pages/MypagePage/UserProfile/UserProfile.tsx +++ b/src/components/pages/MypagePage/UserProfile/UserProfile.tsx @@ -22,7 +22,7 @@ function UserProfile({ ...information }: UserProfileProps) { 별점평균 - {information.ratingAverage} + {information.averageRating} diff --git a/src/mock/userData.ts b/src/mock/userData.ts index 1b48b810..7250e5fe 100644 --- a/src/mock/userData.ts +++ b/src/mock/userData.ts @@ -5,7 +5,7 @@ export const userProfile = { profileImage: "https://images.unsplash.com/photo-1438761681033-6461ffad8d80?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1470&q=80", reviewCount: 4, - ratingAverage: 3.0, + averageRating: 3.0, }; export const bookmarkedStores = [ @@ -71,6 +71,9 @@ export const userReviews: UserReview[] = [ content: "맛있어요", rating: 4, menu: "맛있는 메뉴", + imageUrl: + "https://images.unsplash.com/photo-1626645738196-c2a7c87a8f58?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1170&q=80", + updatable: true, }, { @@ -84,6 +87,8 @@ export const userReviews: UserReview[] = [ content: "더 맛있어요", rating: 5, menu: "더 맛있는 메뉴", + imageUrl: + "https://images.unsplash.com/photo-1626645738196-c2a7c87a8f58?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1170&q=80", updatable: true, }, { @@ -97,6 +102,8 @@ export const userReviews: UserReview[] = [ content: "더 맛있어요", rating: 5, menu: "더 맛있는 메뉴", + imageUrl: + "https://images.unsplash.com/photo-1626645738196-c2a7c87a8f58?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1170&q=80", updatable: true, }, { @@ -110,6 +117,8 @@ export const userReviews: UserReview[] = [ content: "더 맛있어요", rating: 5, menu: "더 맛있는 메뉴", + imageUrl: + "https://images.unsplash.com/photo-1626645738196-c2a7c87a8f58?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1170&q=80", updatable: true, }, { @@ -123,6 +132,8 @@ export const userReviews: UserReview[] = [ content: "더 맛있어요", rating: 5, menu: "더 맛있는 메뉴", + imageUrl: + "https://images.unsplash.com/photo-1626645738196-c2a7c87a8f58?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1170&q=80", updatable: true, }, { @@ -136,6 +147,8 @@ export const userReviews: UserReview[] = [ content: "더 맛있어요", rating: 5, menu: "더 맛있는 메뉴", + imageUrl: + "https://images.unsplash.com/photo-1626645738196-c2a7c87a8f58?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1170&q=80", updatable: true, }, { @@ -149,6 +162,8 @@ export const userReviews: UserReview[] = [ content: "더 맛있어요", rating: 5, menu: "더 맛있는 메뉴", + imageUrl: + "https://images.unsplash.com/photo-1626645738196-c2a7c87a8f58?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1170&q=80", updatable: true, }, ]; diff --git a/src/types/common/bookmarkTypes.ts b/src/types/common/bookmarkTypes.ts index 4c494be0..b4a51510 100644 --- a/src/types/common/bookmarkTypes.ts +++ b/src/types/common/bookmarkTypes.ts @@ -2,6 +2,7 @@ export interface BookmarkStore { id: number; name: string; imageUrl: string; + address: string; rating: number; reviewCount: number; distance: number; diff --git a/src/types/common/mypageTypes.ts b/src/types/common/mypageTypes.ts index 730e3e4d..dcf57507 100644 --- a/src/types/common/mypageTypes.ts +++ b/src/types/common/mypageTypes.ts @@ -5,11 +5,12 @@ export interface UserProfileInformation { username: string; profileImage: string; reviewCount: number; - ratingAverage: number; + averageRating: number; } export interface UserReview extends ReviewInputShape { id: number; restaurant: Pick; + imageUrl: string | null; updatable: boolean; }