.
All checks were successful
Deploy blog-frontend / build-and-deploy (push) Successful in 2m5s

This commit is contained in:
wypark
2026-05-28 22:27:29 +09:00
parent 390778da3e
commit 8a2e05b003
31 changed files with 1221 additions and 385 deletions

View File

@@ -6,6 +6,7 @@ import { useState, useEffect } from 'react';
import { Toaster } from 'react-hot-toast';
import { useAuthStore } from '@/store/authStore';
import axios from 'axios';
import { ThemeProvider } from '@/components/theme/ThemeProvider';
// 🛠️ JWT 토큰 만료 여부 체크 함수 (라이브러리 없이 구현)
function isTokenExpired(token: string) {
@@ -93,13 +94,15 @@ export default function Providers({ children }: { children: React.ReactNode }) {
);
return (
<QueryClientProvider client={queryClient}>
<AuthInitializer /> {/* 👈 앱 실행 시 토큰 자동 검사 */}
{children}
<Toaster position="top-right" />
{process.env.NODE_ENV === 'development' && (
<ReactQueryDevtools initialIsOpen={false} />
)}
</QueryClientProvider>
<ThemeProvider>
<QueryClientProvider client={queryClient}>
<AuthInitializer /> {/* 👈 앱 실행 시 토큰 자동 검사 */}
{children}
<Toaster position="top-right" />
{process.env.NODE_ENV === 'development' && (
<ReactQueryDevtools initialIsOpen={false} />
)}
</QueryClientProvider>
</ThemeProvider>
);
}