Final touches and testing

This commit is contained in:
Andreas
2023-12-28 16:04:27 +07:00
parent 485f0ad2e9
commit 15e3236ab9
10 changed files with 54 additions and 57 deletions

View File

@@ -18,8 +18,8 @@ const useTranscriptList = (page: number): TranscriptList => {
const api = useApi();
useEffect(() => {
setLoading(true);
if (!api) return;
setLoading(true);
api
.v1TranscriptsList(page)
.then((response) => {
@@ -32,7 +32,7 @@ const useTranscriptList = (page: number): TranscriptList => {
setError(err);
setErrorState(err);
});
}, [api, page]);
}, [!api, page]);
return { response, loading, error };
};