mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
feat: major login and signup changes
This commit is contained in:
parent
5ca1ba75e1
commit
2ae8dbeba5
20 changed files with 217 additions and 141 deletions
19
apps/web/app/auth/layout.tsx
Normal file
19
apps/web/app/auth/layout.tsx
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
'use client'
|
||||
import { OrgProvider } from '@components/Contexts/OrgContext'
|
||||
import ErrorUI from '@components/StyledElements/Error/Error'
|
||||
import { useSearchParams } from 'next/navigation'
|
||||
|
||||
|
||||
export default function AuthLayout({
|
||||
children,
|
||||
}: {
|
||||
children: React.ReactNode
|
||||
}) {
|
||||
const searchParams = useSearchParams()
|
||||
const orgslug = searchParams.get('orgslug')
|
||||
if (orgslug) {
|
||||
return <OrgProvider orgslug={orgslug}>{children}</OrgProvider>
|
||||
} else {
|
||||
return <ErrorUI message='Organization not specified' submessage='Please access this page from an Organization' />
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue