diff --git a/package.json b/package.json index c9316486..b9f849c0 100644 --- a/package.json +++ b/package.json @@ -5,6 +5,7 @@ "type": "module", "scripts": { "dev": "vite --mode development", + "build:dev": "tsc && vite build --mode development", "build": "tsc && vite build --mode production", "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", "preview": "vite preview", diff --git a/src/apis/getSearchedChallengeItem.ts b/src/apis/getSearchedChallengeItem.ts index 15819ea9..dbd6c07f 100644 --- a/src/apis/getSearchedChallengeItem.ts +++ b/src/apis/getSearchedChallengeItem.ts @@ -1,3 +1,4 @@ +import { APIImage } from "@/types/apiImageType"; import { acceptInstance } from "./axios/axios"; import requests from "./axios/request"; @@ -13,9 +14,7 @@ interface Data { keyword: string; participantCount: number; pointPerPerson: number; - fileResponse: { - source: string; - }; + fileResponse: APIImage; } const getSearchedChallengeItem = async ({ @@ -44,9 +43,7 @@ const getSearchedChallengeItem = async ({ const { last } = res.data.data; const { pageNumber } = res.data.data.pageable; - return ( - { posts: transformedContent, isLast: last, page: pageNumber } || {} - ); + return { posts: transformedContent, isLast: last, page: pageNumber }; }); return data || {}; }; diff --git a/src/components/Admin/AdminInstance/InstanceListComponent/InstanceListComponent.tsx b/src/components/Admin/AdminInstance/InstanceListComponent/InstanceListComponent.tsx index 06fc622d..0173f5de 100644 --- a/src/components/Admin/AdminInstance/InstanceListComponent/InstanceListComponent.tsx +++ b/src/components/Admin/AdminInstance/InstanceListComponent/InstanceListComponent.tsx @@ -7,6 +7,7 @@ import { useQueryClient } from "react-query"; import { encrypt } from "@/hooks/useCrypto"; import { PATH } from "@/constants/path"; import { format } from "date-fns"; +import { makeAPIImage } from "@/helpers/makeAPIImage"; type instanceListPropsType = { instanceList: instanceListDataType[]; @@ -26,7 +27,7 @@ const InstanceListComponent = ({ instanceList }: instanceListPropsType) => {