Merge branch 'main' of github.com:Monadical-SAS/reflector into sara/feat-speaker-reassign

This commit is contained in:
Sara
2024-01-02 19:20:56 +01:00
77 changed files with 3827 additions and 4588 deletions

View File

@@ -1,9 +1,8 @@
import { useEffect, useState } from "react";
import { V1TranscriptGetRequest } from "../../api/apis/DefaultApi";
import { GetTranscript } from "../../api";
import { useError } from "../../(errors)/errorContext";
import getApi from "../../lib/getApi";
import { shouldShowError } from "../../lib/errorUtils";
import useApi from "../../lib/useApi";
type ErrorTranscript = {
error: Error;
@@ -30,17 +29,15 @@ const useTranscript = (
const [loading, setLoading] = useState<boolean>(true);
const [error, setErrorState] = useState<Error | null>(null);
const { setError } = useError();
const api = getApi();
const api = useApi();
useEffect(() => {
if (!id || !api) return;
setLoading(true);
const requestParameters: V1TranscriptGetRequest = {
transcriptId: id,
};
api
.v1TranscriptGet(requestParameters)
.v1TranscriptGet(id)
.then((result) => {
setResponse(result);
setLoading(false);