diff --git a/client/src/app/(protectedRoute)/new-post/page.tsx b/client/src/app/(protectedRoute)/new-post/page.tsx index 786dda9..e30833d 100644 --- a/client/src/app/(protectedRoute)/new-post/page.tsx +++ b/client/src/app/(protectedRoute)/new-post/page.tsx @@ -28,7 +28,7 @@ import { useInvalidatePostList } from "@/queries/post/useGetPostListInfiniteQuer import { useDeletePostMutation } from "@/queries/post/useDeletePostMutation"; import { NewPostRequestInterface, - NewPostRequest_AlCohol, + NewPostRequestAlCohol, } from "@/types/newPost/NewPostInterface"; import SearchAlcoholInput from "@/components/newpost/SearchAlcoholInput"; @@ -44,7 +44,7 @@ export default function NewpostPage() { tagList: [] as string[], }); - const [alcoholInfo, setAlcoholInfo] = useState(); + const [alcoholInfo, setAlcoholInfo] = useState(); useEffect(() => { console.log(alcoholInfo); }, [alcoholInfo]); diff --git a/client/src/components/newpost/SearchAlcoholInput.tsx b/client/src/components/newpost/SearchAlcoholInput.tsx index ac2867a..c4c3e0e 100644 --- a/client/src/components/newpost/SearchAlcoholInput.tsx +++ b/client/src/components/newpost/SearchAlcoholInput.tsx @@ -16,11 +16,11 @@ import useGetAlcoholListQuery from "@/queries/alcohol/useGetAlcoholListQuery"; import { AlcoholDetailInterface } from "@/types/alcohol/AlcoholInterface"; import AlcoleNameTag from "./../post/AlcoleNameTag"; import useDebounce from "@/hooks/useDebounce"; -import { NewPostRequest_AlCohol } from "@/types/newPost/NewPostInterface"; +import { NewPostRequestAlCohol } from "@/types/newPost/NewPostInterface"; import React from "react"; interface SearchAlcoholInputInterface { - setAlcoholInfo: Dispatch>; + setAlcoholInfo: Dispatch>; } const SearchAlcoholInput = ({ setAlcoholInfo, @@ -34,7 +34,7 @@ const SearchAlcoholInput = ({ const { data, isLoading, isSuccess } = useGetAlcoholListQuery(debouncedValue); const [isSearchingAlcohol, setIsSearchingAlCohol] = useState(false); - const parsedDTO = useMemo(() => { + const parsedDTO = useMemo(() => { if (!selectedAlcohol) { return; } diff --git a/client/src/types/newPost/NewPostInterface.ts b/client/src/types/newPost/NewPostInterface.ts index c102ded..7f4d721 100644 --- a/client/src/types/newPost/NewPostInterface.ts +++ b/client/src/types/newPost/NewPostInterface.ts @@ -1,15 +1,17 @@ -export interface NewPostRequestInterface { +export interface NewPostRequestInterface extends NewPostRequestAlCohol{ /** * 술의 PK */ - alcoholNo?: number; - alcoholInfo?: AlcoholInfoInterface; - alcoholFeature?: string; postContent?: string; postType?: string; positionInfo?: string; tagList?: string[]; } +export interface NewPostRequestAlCohol{ + alcoholNo?: number; + alcoholInfo?: AlcoholInfoInterface; + alcoholFeature?: string; +} interface AlcoholInfoInterface { /**