Skip to content

Commit

Permalink
fix : error 수정
Browse files Browse the repository at this point in the history
fix : error 수정
  • Loading branch information
phyuna0525 authored Mar 14, 2024
2 parents f984e45 + 381d466 commit 701b83e
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 11 deletions.
4 changes: 2 additions & 2 deletions src/apis/login/login.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ export const useLogin = () => {
};
};

export const getTeacherName = () => {
return useMutation<{ name: string }, Error, void>({
export const GetTeacherName = () => {
return useMutation<{ name: string }, Error, null>({
mutationFn: async () => {
try {
const accessToken = getToken();
Expand Down
6 changes: 2 additions & 4 deletions src/app/components/common/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,16 @@ import Image from "next/image";
import Link from "next/link";
import React, { useEffect, useState } from "react";
import pick from "@/assets/img/Icon/pickname.svg";
import { getTeacherName } from "@/apis/login/login";
import { GetTeacherName } from "@/apis/login/login";

interface name {
name: string;
}

const Header: NextPage = ({}) => {
const { mutate: getNameMutate } = getTeacherName();
const { mutate: getNameMutate } = GetTeacherName();
const [data, setData] = useState<name>();

const teacher = "서인석";

const getName = async () => {
try {
const result = await getNameMutate(null, {
Expand Down
6 changes: 3 additions & 3 deletions src/app/main/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,13 @@ const Main = () => {
<Menu href="/WeekendMeals" icon={WeekendMeals}>
주말급식
</Menu>
<Menu href="/notDevelop" icon={classManage}>
<Menu href="/NotDevelop" icon={classManage}>
학급 관리
</Menu>
<Menu href="/afterManage" icon={afterManage}>
<Menu href="/NotDevelop" icon={afterManage}>
방과후 관리
</Menu>
<Menu href="/notDevelop" icon={studentInquiry}>
<Menu href="/NotDevelop" icon={studentInquiry}>
학생 조회
</Menu>
<Menu href="/changeTeacher" icon={changeTeacher}>
Expand Down
4 changes: 2 additions & 2 deletions src/app/notDevelop/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { useRouter } from "next/navigation";
import Header from "../components/common/Header";
import Button from "../components/common/Button";

const notDevelop: NextPage = () => {
const NotDevelop: NextPage = () => {
const router = useRouter();

const onClickBtn = () => {
Expand All @@ -28,4 +28,4 @@ const notDevelop: NextPage = () => {
);
};

export default notDevelop;
export default NotDevelop;

0 comments on commit 701b83e

Please sign in to comment.