mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
refactor: improve perf on the frontend
This commit is contained in:
parent
5e7ae54215
commit
744e372f4e
8 changed files with 61 additions and 51 deletions
|
|
@ -111,11 +111,11 @@ export async function deleteActivity(activity_uuid: any, access_token: string) {
|
|||
export async function getActivityWithAuthHeader(
|
||||
activity_uuid: any,
|
||||
next: any,
|
||||
access_token: string
|
||||
access_token: string | null | undefined
|
||||
) {
|
||||
const result = await fetch(
|
||||
`${getAPIUrl()}activities/activity_${activity_uuid}`,
|
||||
RequestBodyWithAuthHeader('GET', null, next, access_token)
|
||||
RequestBodyWithAuthHeader('GET', null, next, access_token || undefined)
|
||||
)
|
||||
const res = await result.json()
|
||||
return res
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue