From 4fb7e7659c5123edc407dc8070340095d99579c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=84=8B=E1=85=B5=E1=84=8C=E1=85=A2=E1=84=92=E1=85=A1?= Date: Thu, 12 Oct 2023 01:29:24 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20response=20=EB=84=A4=EC=9D=B4=EB=B0=8D?= =?UTF-8?q?=20=EB=B3=80=EA=B2=BD=EB=90=9C=20=EA=B2=83=20=EB=B0=98=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/jurumarble/src/app/search/components/DrinkItem.tsx | 6 +++--- apps/jurumarble/src/app/stamp/components/DrinkItem.tsx | 6 +++--- .../app/vote/[id]/update/components/UpdateVoteContainer.tsx | 4 +--- apps/jurumarble/src/app/vote/post/components/DrinkItem.tsx | 6 +++--- .../src/app/vote/post/components/DrinkSearchModal.tsx | 2 +- .../src/app/vote/post/components/PostVoteContainer.tsx | 2 +- .../src/app/vote/post/hooks/useUpdateSelectedDrinkList.ts | 2 +- .../src/app/vote/post/services/usePostVoteService.ts | 3 ++- apps/jurumarble/src/types/drink.ts | 4 +++- apps/jurumarble/src/types/vote.ts | 2 -- 10 files changed, 18 insertions(+), 19 deletions(-) diff --git a/apps/jurumarble/src/app/search/components/DrinkItem.tsx b/apps/jurumarble/src/app/search/components/DrinkItem.tsx index 2069f115..90c78051 100644 --- a/apps/jurumarble/src/app/search/components/DrinkItem.tsx +++ b/apps/jurumarble/src/app/search/components/DrinkItem.tsx @@ -15,7 +15,7 @@ interface Props { } function DrinkItem({ drinkInfo, onClickDrinkItem, selectedDrinkList }: Props) { - const { id, name, productName, image, enjoyCount } = drinkInfo; + const { id, name, manufacturer, image, enjoyCount, region } = drinkInfo; const { colors } = useTheme(); @@ -40,9 +40,9 @@ function DrinkItem({ drinkInfo, onClickDrinkItem, selectedDrinkList }: Props) { - {productName} + {manufacturer} - 서울 + {region} {enjoyCount}명이 즐겼어요 diff --git a/apps/jurumarble/src/app/stamp/components/DrinkItem.tsx b/apps/jurumarble/src/app/stamp/components/DrinkItem.tsx index 54bc5cdc..2a26b46d 100644 --- a/apps/jurumarble/src/app/stamp/components/DrinkItem.tsx +++ b/apps/jurumarble/src/app/stamp/components/DrinkItem.tsx @@ -11,7 +11,7 @@ interface Props { | { id: number; name: string; - productName: string; + manufacturer: string; image: string; }; onClickReplaceDrinkInfo: (e: React.MouseEvent) => void; @@ -19,7 +19,7 @@ interface Props { } function DrinkItem({ drinkInfo, onClickReplaceDrinkInfo, selectedDrinkList }: Props) { - const { id, name, productName, image } = drinkInfo; + const { id, name, manufacturer, image } = drinkInfo; const { colors } = useTheme(); @@ -48,7 +48,7 @@ function DrinkItem({ drinkInfo, onClickReplaceDrinkInfo, selectedDrinkList }: Pr - {productName} + {manufacturer} ); diff --git a/apps/jurumarble/src/app/vote/[id]/update/components/UpdateVoteContainer.tsx b/apps/jurumarble/src/app/vote/[id]/update/components/UpdateVoteContainer.tsx index 6106840c..e3ddf00f 100644 --- a/apps/jurumarble/src/app/vote/[id]/update/components/UpdateVoteContainer.tsx +++ b/apps/jurumarble/src/app/vote/[id]/update/components/UpdateVoteContainer.tsx @@ -9,10 +9,8 @@ import SvgIcPrevious from "src/assets/icons/components/IcPrevious"; import { useRouter } from "next/navigation"; import { useMemo, useState } from "react"; import Image from "next/image"; - -import { DrinkInfoType } from "src/types/vote"; +import { DrinkInfoType } from "src/types/drink"; import AorBMark from "components/AorBMark"; - import TitleAndDescriptionSection from "app/vote/post/components/TitleAndDescriptionSection"; import PostBottomSheet from "app/vote/post/components/PostBottomSheet"; import DrinkSearchModal from "app/vote/post/components/DrinkSearchModal"; diff --git a/apps/jurumarble/src/app/vote/post/components/DrinkItem.tsx b/apps/jurumarble/src/app/vote/post/components/DrinkItem.tsx index 4a3c8a19..ba6b951a 100644 --- a/apps/jurumarble/src/app/vote/post/components/DrinkItem.tsx +++ b/apps/jurumarble/src/app/vote/post/components/DrinkItem.tsx @@ -2,7 +2,7 @@ import Chip from "components/Chip"; import { transitions } from "lib/styles"; import Image from "next/image"; import { DrinkInfo } from "src/types/drink"; -import { DrinkInfoType } from "src/types/vote"; +import { DrinkInfoType } from "src/types/drink"; import styled, { css } from "styled-components"; interface Props { @@ -12,7 +12,7 @@ interface Props { } function DrinkItem({ drinkInfo, onClickAddDrink, selectedDrinkList }: Props) { - const { name, productName, image } = drinkInfo; + const { name, manufacturer, image } = drinkInfo; const isInclude = (selectedDrink: DrinkInfoType) => selectedDrink.id === drinkInfo.id; @@ -25,7 +25,7 @@ function DrinkItem({ drinkInfo, onClickAddDrink, selectedDrinkList }: Props) { {name} - {productName} + {manufacturer} 서울 213명이 즐겼어요 diff --git a/apps/jurumarble/src/app/vote/post/components/DrinkSearchModal.tsx b/apps/jurumarble/src/app/vote/post/components/DrinkSearchModal.tsx index 78af8bb3..6c0623a2 100644 --- a/apps/jurumarble/src/app/vote/post/components/DrinkSearchModal.tsx +++ b/apps/jurumarble/src/app/vote/post/components/DrinkSearchModal.tsx @@ -10,7 +10,7 @@ import SelectedDrinkChip from "./SelectedDrinkChip"; import DrinkItem from "app/vote/post/components/DrinkItem"; import SearchInput from "components/SearchInput"; import useInput from "hooks/useInput"; -import { DrinkInfoType } from "src/types/vote"; +import { DrinkInfoType } from "src/types/drink"; import useGetDrinkList from "../services/useGetDrinkList"; import RegionSelect from "./RegionSelect"; diff --git a/apps/jurumarble/src/app/vote/post/components/PostVoteContainer.tsx b/apps/jurumarble/src/app/vote/post/components/PostVoteContainer.tsx index f98e99c5..6272136c 100644 --- a/apps/jurumarble/src/app/vote/post/components/PostVoteContainer.tsx +++ b/apps/jurumarble/src/app/vote/post/components/PostVoteContainer.tsx @@ -12,7 +12,7 @@ import Image from "next/image"; import TitleAndDescriptionSection from "./TitleAndDescriptionSection"; import DrinkSearchModal from "./DrinkSearchModal"; import usePostVoteService from "../services/usePostVoteService"; -import { DrinkInfoType } from "src/types/vote"; +import { DrinkInfoType } from "src/types/drink"; import AorBMark from "components/AorBMark"; import { media } from "lib/styles"; import { SvgIcX, SvgInfo } from "src/assets/icons/components"; diff --git a/apps/jurumarble/src/app/vote/post/hooks/useUpdateSelectedDrinkList.ts b/apps/jurumarble/src/app/vote/post/hooks/useUpdateSelectedDrinkList.ts index d94bb080..27201a3b 100644 --- a/apps/jurumarble/src/app/vote/post/hooks/useUpdateSelectedDrinkList.ts +++ b/apps/jurumarble/src/app/vote/post/hooks/useUpdateSelectedDrinkList.ts @@ -1,5 +1,5 @@ import { useState } from "react"; -import { DrinkInfoType } from "src/types/vote"; +import { DrinkInfoType } from "src/types/drink"; export default function useUpdateSelectedDrinkList() { const [selectedDrinkList, setDrinkList] = useState([]); diff --git a/apps/jurumarble/src/app/vote/post/services/usePostVoteService.ts b/apps/jurumarble/src/app/vote/post/services/usePostVoteService.ts index ba1dc862..6b556a97 100644 --- a/apps/jurumarble/src/app/vote/post/services/usePostVoteService.ts +++ b/apps/jurumarble/src/app/vote/post/services/usePostVoteService.ts @@ -3,8 +3,9 @@ import { useMutation } from "@tanstack/react-query"; import { useRouter } from "next/navigation"; import { uploadImageAPI } from "lib/apis/common"; import { postDrinkVoteAPI, postNormalVoteAPI } from "lib/apis/vote"; -import { DrinkInfoType, PostVoteType } from "src/types/vote"; +import { PostVoteType } from "src/types/vote"; import Path from "lib/Path"; +import { DrinkInfoType } from "src/types/drink"; export default function usePostVoteService() { const router = useRouter(); diff --git a/apps/jurumarble/src/types/drink.ts b/apps/jurumarble/src/types/drink.ts index 489d4cf7..ba73bce0 100644 --- a/apps/jurumarble/src/types/drink.ts +++ b/apps/jurumarble/src/types/drink.ts @@ -17,7 +17,7 @@ export interface DrinkInfo { id: number; name: string; type: string; - productName: string; + manufacturer: string; alcoholicBeverage: string; rawMaterial: string; capacity: string; @@ -30,6 +30,8 @@ export interface DrinkInfo { enjoyCount: number | null; } +export type DrinkInfoType = Pick; + export interface DrinkMapInfo { drinkId: number; name: string; diff --git a/apps/jurumarble/src/types/vote.ts b/apps/jurumarble/src/types/vote.ts index 1cf5f636..441e1a67 100644 --- a/apps/jurumarble/src/types/vote.ts +++ b/apps/jurumarble/src/types/vote.ts @@ -9,8 +9,6 @@ export type PostVoteType = PostNormalVoteRequest & PostDrinkVoteRequest; * @TODO 네이밍 변경 필요 */ -export type DrinkInfoType = Pick; - export interface Content { voteId: number; postedUserId: number;