Skip to content

Commit

Permalink
FE: [feat] params를 반영하여 API 연결 #41
Browse files Browse the repository at this point in the history
  • Loading branch information
hyeona01 committed Nov 19, 2024
1 parent 988d639 commit 5cb7f1d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 10 deletions.
7 changes: 0 additions & 7 deletions src/frontend/eyesee-admin/src/app/addExam/page.tsx

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@ import DashBoardSection from "@/components/dashBoard/DashBoardSection";
import UserSection from "@/components/dashBoard/UserSection";
import { useDashboardData } from "@/hooks/api/useDashboard";
import { testSesstion } from "@/types/user";
import { useParams } from "next/navigation";
import React, { useEffect, useState } from "react";

const DashBoardPage = () => {
const { examId } = useParams();
const [sessionData, setSessionData] = useState<testSesstion>();
const { data } = useDashboardData(1);
const { data } = useDashboardData(Number(examId));

useEffect(() => {
if (data) {
Expand Down
3 changes: 2 additions & 1 deletion src/frontend/eyesee-admin/src/app/providers.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use client";

import { getAccessToken } from "@/utils/auth";
import { deleteAccessToken, getAccessToken } from "@/utils/auth";
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import { ReactNode } from "react";

Expand Down Expand Up @@ -33,6 +33,7 @@ type ProvidersProps = {

export default function Providers({ children }: ProvidersProps) {
const queryClient = getQueryClient();
// TODO: 테스트코드 삭제
console.log(getAccessToken());

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const TestCard = ({ test, type }: TestCardProps) => {
if (type === testState.BEFORE) {
return {
icon: <EditIcon />,
path: `/editExam/${test.examId}`,
path: `/edit-exam/${test.examId}`,
label: "Edit",
};
} else {
Expand Down

0 comments on commit 5cb7f1d

Please sign in to comment.