fix: session issues/bugs

This commit is contained in:
swve 2024-06-10 10:17:45 +01:00
parent 81bc8e7e82
commit 644693149a
20 changed files with 20 additions and 21 deletions

View file

@ -21,7 +21,7 @@ import { useLHSession } from '@components/Contexts/LHSessionContext'
function OrgAccess() {
const org = useOrg() as any
const session = useLHSession() as any
const access_token = session.data.tokens.access_token;
const access_token = session?.data?.tokens?.access_token;
const { data: invites } = useSWR(
org ? `${getAPIUrl()}orgs/${org?.id}/invites` : null,
(url) => swrFetcher(url, access_token)