mirror of
https://github.com/ichsankurnia/hats-app.git
synced 2026-12-06 16:56:29 +00:00
23 lines
487 B
TypeScript
23 lines
487 B
TypeScript
'use client'
|
|
|
|
import { ReactNode } from 'react';
|
|
import { type Session } from 'next-auth';
|
|
import { SessionProvider as Provider } from 'next-auth/react'
|
|
|
|
type Props = {
|
|
children: ReactNode,
|
|
session: Session | null
|
|
basePath?: string
|
|
};
|
|
|
|
const SessionProvider: React.FC<Props> = ({ children, session }) => {
|
|
return (
|
|
<>
|
|
<Provider session={session}>
|
|
{children}
|
|
</Provider>
|
|
</>
|
|
);
|
|
}
|
|
|
|
export default SessionProvider; |