From e917a5b5b6c9d8a9fc15ffd645a85ad81e116e4b Mon Sep 17 00:00:00 2001 From: iOdiO89 <117376841+iOdiO89@users.noreply.github.com> Date: Fri, 12 Jul 2024 23:12:57 +0900 Subject: [PATCH] #97 fix: esLint error --- src/hooks/query/relation.ts | 6 +++--- src/pages/oauth/redirect.tsx | 7 ++----- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/hooks/query/relation.ts b/src/hooks/query/relation.ts index 493fa27..6cfe486 100644 --- a/src/hooks/query/relation.ts +++ b/src/hooks/query/relation.ts @@ -9,10 +9,10 @@ import { import { storeIdAtom } from "@/data/global"; import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query"; import { useAtom } from "jotai"; -import { usePostPlanList } from "./plan"; +import { useRouter } from "next/router"; import { InviteSchedule } from "@/data/inviteSchedule"; +import { usePostPlanList } from "./plan"; import { useGetMyQueryKey } from "./my"; -import { useRouter } from "next/router"; interface UsePostRelationProps { storeId: string; @@ -81,7 +81,7 @@ function useStaffJoin() { body, inviteSchedule, }: UsePostRelationProps & { inviteSchedule: InviteSchedule }) => { - const ret = await postRelation(storeId, memberId, body); + await postRelation(storeId, memberId, body); postPlanListMutate({ storeId, memberId, inviteSchedule }); }, onSuccess: async () => { diff --git a/src/pages/oauth/redirect.tsx b/src/pages/oauth/redirect.tsx index c35c4f1..4668251 100644 --- a/src/pages/oauth/redirect.tsx +++ b/src/pages/oauth/redirect.tsx @@ -1,8 +1,7 @@ import { PostRelationBody } from "@/apis/relation"; import { myAtom } from "@/data/global"; -import { usePostPlanList } from "@/hooks/query/plan"; -import { usePostRelation, useStaffJoin } from "@/hooks/query/relation"; -import { InviteResponse, InviteDataType } from "@/screen/manage/ShareLink"; +import { useStaffJoin } from "@/hooks/query/relation"; +import { InviteResponse } from "@/screen/manage/ShareLink"; import axios from "axios"; import { useAtom } from "jotai"; import { useRouter } from "next/router"; @@ -11,8 +10,6 @@ import { useEffect } from "react"; export default function Redirect() { const { push } = useRouter(); const [my] = useAtom(myAtom); - const { mutate: postRelationMutate } = usePostRelation(); - const { mutate: postPlanListMutate } = usePostPlanList(); const { mutate: staffJoinMutate } = useStaffJoin(); async function getInviteData(inviteDataId: string) {