diff --git a/src/entities/post/api/getPosts.ts b/src/entities/post/api/getPosts.ts index 2eecd2cf..3943e4b9 100644 --- a/src/entities/post/api/getPosts.ts +++ b/src/entities/post/api/getPosts.ts @@ -1,4 +1,5 @@ import { serverFetch } from "@/shared/api/fetcher.server"; +import { apiFetch } from "@/shared/api/fetcher"; import { POST_PAGE_SIZE } from "@/entities/post/model/constants/api"; import type { Post } from "@/entities/post/model/types/post"; @@ -22,7 +23,7 @@ export async function getPosts({ if (keyword) query.append("keyword", keyword); if (sort) query.append("sort", sort); - const { data } = await serverFetch<{ data: Post[] }>( + const { data } = await apiFetch<{ data: Post[] }>( `/api/postings?${query.toString()}`, { method: "GET" }, ); diff --git a/src/entities/user/ui/card/Profile.tsx b/src/entities/user/ui/card/Profile.tsx index 21d39a50..448d422f 100644 --- a/src/entities/user/ui/card/Profile.tsx +++ b/src/entities/user/ui/card/Profile.tsx @@ -6,6 +6,7 @@ import Image from "next/image"; import { useAuthStore } from "@/features/auth/model/auth.store"; import Button from "@/shared/ui/Button/Button"; import DefaultProfileImage from "./assets/profile.jpg"; +import { apiFetch } from "@/shared/api/fetcher"; export interface ProfileProps { nickname: string; @@ -80,7 +81,11 @@ const Profile = ({