mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2025-12-21 04:39:06 +00:00
NextJS 14 experimental upgrade
This commit is contained in:
@@ -3,7 +3,6 @@ import { useError } from "../../(errors)/errorContext";
|
||||
import { GetTranscript, CreateTranscript } from "../../api";
|
||||
import useApi from "../../lib/useApi";
|
||||
|
||||
|
||||
type UseTranscript = {
|
||||
transcript: GetTranscript | null;
|
||||
loading: boolean;
|
||||
@@ -23,26 +22,16 @@ const useCreateTranscript = (): UseTranscript => {
|
||||
|
||||
setLoading(true);
|
||||
|
||||
console.debug(
|
||||
console.log(
|
||||
"POST - /v1/transcripts/ - Requesting new transcription creation",
|
||||
transcriptCreationDetails,
|
||||
api
|
||||
api,
|
||||
);
|
||||
|
||||
const aaa = async () => {
|
||||
console.log("Calling API...");
|
||||
console.log("START");
|
||||
|
||||
await new Promise((res) => setTimeout(res, 500));
|
||||
|
||||
console.log("500 ms elapsed - calling api");
|
||||
|
||||
const test = await api.v1TranscriptsCreate(transcriptCreationDetails);
|
||||
console.log(test);
|
||||
};
|
||||
|
||||
aaa();
|
||||
|
||||
api.v1TranscriptsCreate(transcriptCreationDetails)
|
||||
api
|
||||
.v1TranscriptsCreate(transcriptCreationDetails)
|
||||
.then((transcript) => {
|
||||
console.debug("New transcript created:", transcript);
|
||||
setTranscript(transcript);
|
||||
@@ -55,6 +44,9 @@ const useCreateTranscript = (): UseTranscript => {
|
||||
);
|
||||
setErrorState(err);
|
||||
setLoading(false);
|
||||
})
|
||||
.finally(() => {
|
||||
console.log("At least this should display?");
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user