Skip to content

Commit 70d0116

Browse files
committed
user-certification-progress.ready - convert to boolean
1 parent fe608e4 commit 70d0116

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src-ts/tools/learn/learn-lib/data-providers/user-certifications-provider/user-certification-progress.provider.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,12 @@ export function useGetUserCertificationProgress(
2727
isPaused: () => !userId || !certification,
2828
})
2929

30+
const certificationProgress: LearnUserCertificationProgress | undefined = find(data, { certification })
31+
3032
return {
31-
certificationProgress: find(data, { certification }),
33+
certificationProgress,
3234
loading: !!userId && !data && !error,
33-
ready: !userId || data || error,
35+
ready: !userId || !!data || !!error,
3436
refetch: () => mutate(),
3537
setCertificateProgress: progress => mutate([progress]),
3638
}

0 commit comments

Comments
 (0)