fix: session auth issues

This commit is contained in:
swve 2024-05-27 20:58:32 +02:00
parent 1708b36818
commit 08cc97f557
70 changed files with 607 additions and 427 deletions

View file

@ -4,7 +4,7 @@ import Image from 'next/image'
import { getOrgLogoMediaDirectory } from '@services/media/media'
import Link from 'next/link'
import { getUriWithOrg } from '@services/config/config'
import { useSession } from 'next-auth/react'
import { useLHSession } from '@components/Contexts/LHSessionContext'
import React, { useEffect } from 'react'
import { MailWarning, Shield, Ticket, UserPlus } from 'lucide-react'
import { useOrg } from '@components/Contexts/OrgContext'
@ -22,7 +22,7 @@ interface SignUpClientProps {
}
function SignUpClient(props: SignUpClientProps) {
const session = useSession() as any
const session = useLHSession() as any
const [joinMethod, setJoinMethod] = React.useState('open')
const [inviteCode, setInviteCode] = React.useState('')
const searchParams = useSearchParams()
@ -113,7 +113,7 @@ function SignUpClient(props: SignUpClientProps) {
}
const LoggedInJoinScreen = (props: any) => {
const session = useSession() as any
const session = useLHSession() as any
const org = useOrg() as any
const [isLoading, setIsLoading] = React.useState(true)
@ -144,7 +144,7 @@ const LoggedInJoinScreen = (props: any) => {
}
const NoTokenScreen = (props: any) => {
const session = useSession() as any
const session = useLHSession() as any
const org = useOrg() as any
const router = useRouter()
const [isLoading, setIsLoading] = React.useState(true)