This commit is contained in:
Sara
2023-11-22 13:20:11 +01:00
parent f38dad3ad4
commit f14e6f5a7f
16 changed files with 38 additions and 40 deletions

View File

@@ -24,14 +24,13 @@ type SuccessTranscript = {
};
const useTranscript = (
protectedPath: boolean,
id: string | null,
): ErrorTranscript | LoadingTranscript | SuccessTranscript => {
const [response, setResponse] = useState<GetTranscript | null>(null);
const [loading, setLoading] = useState<boolean>(true);
const [error, setErrorState] = useState<Error | null>(null);
const { setError } = useError();
const api = getApi(protectedPath);
const api = getApi();
useEffect(() => {
if (!id || !api) return;