mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
fix: session auth issues
This commit is contained in:
parent
1708b36818
commit
08cc97f557
70 changed files with 607 additions and 427 deletions
|
|
@ -1,16 +1,19 @@
|
|||
import PageLoading from '@components/Objects/Loaders/PageLoading'
|
||||
import { getAPIUrl } from '@services/config/config'
|
||||
import { swrFetcher } from '@services/utils/ts/requests'
|
||||
import { useLHSession } from '@components/Contexts/LHSessionContext'
|
||||
import { useRouter } from 'next/navigation'
|
||||
import React, { useEffect } from 'react'
|
||||
import useSWR, { mutate } from 'swr'
|
||||
|
||||
function GetStarted() {
|
||||
const session = useLHSession() as any;
|
||||
const access_token = session?.data?.tokens?.access_token;
|
||||
const {
|
||||
data: install,
|
||||
error: error,
|
||||
isLoading,
|
||||
} = useSWR(`${getAPIUrl()}install/latest`, swrFetcher)
|
||||
} = useSWR(`${getAPIUrl()}install/latest`, (url) => swrFetcher(url, access_token))
|
||||
const router = useRouter()
|
||||
|
||||
async function startInstallation() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue