generated from pricelees/issue-pr-template
fix: frontend에서의 빌드 오류 해결
This commit is contained in:
parent
252acf866a
commit
526598a24f
@ -1,4 +1,4 @@
|
|||||||
import React, { ReactNode } from 'react';
|
import React, { type ReactNode } from 'react';
|
||||||
import Navbar from './Navbar';
|
import Navbar from './Navbar';
|
||||||
|
|
||||||
interface LayoutProps {
|
interface LayoutProps {
|
||||||
|
|||||||
@ -1,5 +1,4 @@
|
|||||||
import { checkLogin } from '@_api/auth/authAPI';
|
import React from 'react';
|
||||||
import React, { useEffect, useState } from 'react';
|
|
||||||
import { Link, useNavigate } from 'react-router-dom';
|
import { Link, useNavigate } from 'react-router-dom';
|
||||||
import { useAuth } from 'src/context/AuthContext';
|
import { useAuth } from 'src/context/AuthContext';
|
||||||
|
|
||||||
|
|||||||
@ -1,13 +1,13 @@
|
|||||||
import React, { createContext, useState, useEffect, ReactNode, useContext } from 'react';
|
|
||||||
import { checkLogin as apiCheckLogin, login as apiLogin, logout as apiLogout } from '@_api/auth/authAPI';
|
import { checkLogin as apiCheckLogin, login as apiLogin, logout as apiLogout } from '@_api/auth/authAPI';
|
||||||
import type { LoginRequest, LoginCheckResponse } from '@_api/auth/authTypes';
|
import type { LoginRequest, LoginResponse } from '@_api/auth/authTypes';
|
||||||
|
import React, { createContext, useContext, useEffect, useState, type ReactNode } from 'react';
|
||||||
|
|
||||||
interface AuthContextType {
|
interface AuthContextType {
|
||||||
loggedIn: boolean;
|
loggedIn: boolean;
|
||||||
userName: string | null;
|
userName: string | null;
|
||||||
role: 'ADMIN' | 'MEMBER' | null;
|
role: 'ADMIN' | 'MEMBER' | null;
|
||||||
loading: boolean; // Add loading state to type
|
loading: boolean; // Add loading state to type
|
||||||
login: (data: LoginRequest) => Promise<LoginCheckResponse>;
|
login: (data: LoginRequest) => Promise<LoginResponse>;
|
||||||
logout: () => Promise<void>;
|
logout: () => Promise<void>;
|
||||||
checkLogin: () => Promise<void>;
|
checkLogin: () => Promise<void>;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import React, { ReactNode } from 'react';
|
import React, { type ReactNode } from 'react';
|
||||||
import AdminNavbar from './AdminNavbar';
|
import AdminNavbar from './AdminNavbar';
|
||||||
|
|
||||||
interface AdminLayoutProps {
|
interface AdminLayoutProps {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user