forked from xizon/fullstack-nextjs-app-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProviderLayout.tsx
More file actions
36 lines (20 loc) · 745 Bytes
/
Copy pathProviderLayout.tsx
File metadata and controls
36 lines (20 loc) · 745 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
'use client'
// store
import { store } from "@/store/createStore";
import { Provider } from "react-redux";
// auth
import { AuthProvider } from '@/contexts/JWTAuthContext';
// using disk cache
// import '../public/assets/css/xxx.css';
export default function ProviderLayout({children}) {
return (
<>
{/* If you use `<Script>` here, please use `function ScriptLoader(props) { return useMemo(() => <Script strategy="beforeInteractive" src={props.url} />, [])}` to avoid loading the same thing repeatedly js file */}
<Provider store={store}>
<AuthProvider>
{children}
</AuthProvider>
</Provider>
</>
)
}