Skip to content

Commit

Permalink
refactor: api 변경사항 반영
Browse files Browse the repository at this point in the history
Co-authored-by: Rulu <hafnium1923@users.noreply.github.com>
  • Loading branch information
ashleysyheo and hafnium1923 committed Jun 26, 2023
1 parent 872c6bd commit ccf8a4a
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function UserProfile({ ...information }: UserProfileProps) {
별점평균
</Text>
<Text css={S.subTextNumberStyle} size="sm">
{information.ratingAverage}
{information.averageRating}
</Text>
</S.ReviewInfoWrapper>
</S.ContentWrapper>
Expand Down
17 changes: 16 additions & 1 deletion src/mock/userData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down Expand Up @@ -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,
},
{
Expand All @@ -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,
},
{
Expand All @@ -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,
},
{
Expand All @@ -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,
},
{
Expand All @@ -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,
},
{
Expand All @@ -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,
},
{
Expand All @@ -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,
},
];
1 change: 1 addition & 0 deletions src/types/common/bookmarkTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ export interface BookmarkStore {
id: number;
name: string;
imageUrl: string;
address: string;
rating: number;
reviewCount: number;
distance: number;
Expand Down
3 changes: 2 additions & 1 deletion src/types/common/mypageTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<Store, "id" | "name" | "imageUrl">;
imageUrl: string | null;
updatable: boolean;
}

0 comments on commit ccf8a4a

Please sign in to comment.