mirror of
https://github.com/vercel/next-learn.git
synced 2026-06-15 11:51:39 +00:00
re-name sessionprovider compoennt
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import './global.css';
|
||||
import type { Metadata } from 'next';
|
||||
import { Inter } from 'next/font/google';
|
||||
import { AuthProvider } from './providers';
|
||||
import Providers from './providers';
|
||||
|
||||
const inter = Inter({ subsets: ['latin'] });
|
||||
|
||||
@@ -18,7 +18,7 @@ export default function RootLayout({
|
||||
return (
|
||||
<html lang="en">
|
||||
<body className={inter.className}>
|
||||
<AuthProvider>{children}</AuthProvider>
|
||||
<Providers>{children}</Providers>
|
||||
</body>
|
||||
</html>
|
||||
);
|
||||
|
||||
@@ -2,6 +2,6 @@
|
||||
|
||||
import { SessionProvider } from 'next-auth/react';
|
||||
|
||||
export const AuthProvider = ({ children }) => {
|
||||
export default function Providers({ children }: { children: React.ReactNode }) {
|
||||
return <SessionProvider>{children}</SessionProvider>;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user