You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
531 B
17 lines
531 B
"use client";
|
|
|
|
import { loadTokenFromStorage } from "@/lib/token";
|
|
import { useEffect, useState } from "react";
|
|
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
|
|
|
|
export default function Providers({ children }: { children: React.ReactNode }) {
|
|
const [queryClient] = useState(() => new QueryClient());
|
|
|
|
useEffect(() => {
|
|
loadTokenFromStorage(); // 새로고침 토큰 복원
|
|
}, []);
|
|
|
|
return (
|
|
<QueryClientProvider client={queryClient}>{children}</QueryClientProvider>
|
|
);
|
|
}
|
|
|