www: ensure login waited before recording

if you refresh the record page, it does not work and return 404 because the transcript is accessed without token
This commit is contained in:
2023-10-25 19:50:08 +02:00
committed by Mathieu Virbel
parent 367912869d
commit a45b30ee70
2 changed files with 13 additions and 4 deletions

View File

@@ -35,7 +35,7 @@ export default function TranscriptDetails(details: TranscriptDetails) {
useEffect(() => {
if (requireLogin && !isAuthenticated) return;
setTranscriptId(details.params.transcriptId);
}, [api]);
}, [api, details.params.transcriptId, isAuthenticated]);
if (transcript?.error /** || topics?.error || waveform?.error **/) {
return (