mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
feat: middleware support for oauth
This commit is contained in:
parent
52f2235942
commit
5ca1ba75e1
15 changed files with 212 additions and 43 deletions
|
|
@ -10,16 +10,17 @@ function LHSessionProvider({ children }: { children: React.ReactNode }) {
|
|||
|
||||
useEffect(() => {
|
||||
console.log('useLHSession', session);
|
||||
}, [session])
|
||||
}, [])
|
||||
|
||||
|
||||
if (session.status == 'loading') {
|
||||
if (session && session.status == 'loading') {
|
||||
return <PageLoading />
|
||||
}
|
||||
|
||||
else {
|
||||
else if (session) {
|
||||
return (
|
||||
<SessionContext.Provider value={session}>
|
||||
{console.log('rendered')}
|
||||
{children}
|
||||
</SessionContext.Provider>
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue