mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2025-12-21 04:39:06 +00:00
Fixes discussed during call w/ Mathieu
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import { useEffect, useState } from "react";
|
||||
import { DefaultApi, V1TranscriptsCreateRequest } from "../api/apis/DefaultApi";
|
||||
import { Configuration } from "../api/runtime";
|
||||
import { GetTranscript } from "../api";
|
||||
import getApi from "../lib/getApi";
|
||||
|
||||
@@ -11,13 +10,11 @@ type UseTranscript = {
|
||||
createTranscript: () => void;
|
||||
};
|
||||
|
||||
const useTranscript = (): UseTranscript => {
|
||||
const useTranscript = (api: DefaultApi): UseTranscript => {
|
||||
const [response, setResponse] = useState<GetTranscript | null>(null);
|
||||
const [loading, setLoading] = useState<boolean>(false);
|
||||
const [error, setError] = useState<string | null>(null);
|
||||
|
||||
const api = getApi();
|
||||
|
||||
const createTranscript = () => {
|
||||
setLoading(true);
|
||||
const requestParameters: V1TranscriptsCreateRequest = {
|
||||
|
||||
Reference in New Issue
Block a user