Skip to content

Commit

Permalink
fix :: api함수명 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
KANGYONGSU23 committed Nov 28, 2023
1 parent c4c8cba commit 81780f4
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 12 deletions.
8 changes: 3 additions & 5 deletions src/apis/applications/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { useMutation } from "@tanstack/react-query";
import { useMutation, useQuery } from "@tanstack/react-query";
import { useToastStore } from "@team-return/design-system";
import { AxiosError } from "axios";
import { useRouter } from "next/navigation";
import { instance } from "../axios";
import { ApplyRequestItmeType } from "./type";
import { ApplicationsResponseType, ApplyRequestItmeType } from "./type";

const router = "/applications";

Expand Down Expand Up @@ -52,10 +52,8 @@ export default function useApplyToCompany(recruitmentId: string) {
);
}

import { useQuery } from "@tanstack/react-query";
import { ApplicationsResponseType } from "./type";

export function GetApplications() {
export function useGetApplications() {
return useQuery(["GetApplications"], async () => {
const { data } = await instance.get<ApplicationsResponseType>(
`${router}/students`
Expand Down
2 changes: 1 addition & 1 deletion src/apis/code/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { CodeType, GetCodeType } from "./type";
import { useQuery } from "@tanstack/react-query";
import axios from "axios";
import { CodeType, GetCodeType } from "./type";

const router = "/codes";

Expand Down
2 changes: 1 addition & 1 deletion src/apis/recruitments/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { instance } from "../axios";
import {
GetNumberOfPagesType,
RecruitmentsDetailType,
RecruitmentsListResponseType,
RecruitmentsListResponseType
} from "./type";

const router = "/recruitments";
Expand Down
2 changes: 1 addition & 1 deletion src/apis/reviews/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { useQuery } from "@tanstack/react-query";
import { instance } from "../axios";
import {
getReviewDetailResponseProps,
getReviewListResponseProps,
getReviewListResponseProps
} from "./type";

const router = "/reviews";
Expand Down
4 changes: 2 additions & 2 deletions src/components/mypage/AppliedCompaniesList.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
"use client";

import { GetApplications } from "@/apis/applications";
import { useGetApplications } from "@/apis/applications";
import APpliedCompanyItem from "./AppliedICompanyItem";
import Docs from "@public/Docs.svg";
import Image from "next/image";

export default function AppliedCompaniesList() {
const { data: applications } = GetApplications();
const { data: applications } = useGetApplications();

return (
<div className="mt-10">
Expand Down
4 changes: 2 additions & 2 deletions src/components/mypage/DetailProfile.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
"use client";

import { MyProfile } from "@/apis/students";
import { useMyProfile } from "@/apis/students";
import { departmentEnum } from "@/util/object/enum";
import { getMypageKebabItems } from "@/util/object/kebabMenuItems";
import Image from "next/image";
import KebabMenu from "../common/Dropdown/KebabMenu";
import GhostTag from "./GhostTag";

export default function DetailProfile() {
const { data: profile } = MyProfile();
const { data: profile } = useMyProfile();

return (
<div className="flex items-center gap-6">
Expand Down

0 comments on commit 81780f4

Please sign in to comment.