Skip to content

Commit

Permalink
Minor : 인터페이스명 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
jobkaeHenry committed Nov 13, 2023
1 parent e807e1d commit 688da95
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
4 changes: 2 additions & 2 deletions client/src/app/(protectedRoute)/new-post/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand All @@ -44,7 +44,7 @@ export default function NewpostPage() {
tagList: [] as string[],
});

const [alcoholInfo, setAlcoholInfo] = useState<NewPostRequest_AlCohol>();
const [alcoholInfo, setAlcoholInfo] = useState<NewPostRequestAlCohol>();
useEffect(() => {
console.log(alcoholInfo);
}, [alcoholInfo]);
Expand Down
6 changes: 3 additions & 3 deletions client/src/components/newpost/SearchAlcoholInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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<SetStateAction<NewPostRequest_AlCohol | undefined>>;
setAlcoholInfo: Dispatch<SetStateAction<NewPostRequestAlCohol | undefined>>;
}
const SearchAlcoholInput = ({
setAlcoholInfo,
Expand All @@ -34,7 +34,7 @@ const SearchAlcoholInput = ({
const { data, isLoading, isSuccess } = useGetAlcoholListQuery(debouncedValue);
const [isSearchingAlcohol, setIsSearchingAlCohol] = useState(false);

const parsedDTO = useMemo<NewPostRequest_AlCohol | undefined>(() => {
const parsedDTO = useMemo<NewPostRequestAlCohol | undefined>(() => {
if (!selectedAlcohol) {
return;
}
Expand Down
10 changes: 6 additions & 4 deletions client/src/types/newPost/NewPostInterface.ts
Original file line number Diff line number Diff line change
@@ -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 {
/**
Expand Down

0 comments on commit 688da95

Please sign in to comment.