fix loading indication

This commit is contained in:
Sara
2024-01-03 15:52:26 +01:00
parent eecb91ccdd
commit 088be8d9cc
7 changed files with 6 additions and 11 deletions

View File

@@ -1,4 +1,4 @@
import { faArrowTurnDown, faSpinner } from "@fortawesome/free-solid-svg-icons"; import { faArrowTurnDown } from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { ChangeEvent, useEffect, useRef, useState } from "react"; import { ChangeEvent, useEffect, useRef, useState } from "react";
import { Participant } from "../../../../api"; import { Participant } from "../../../../api";
@@ -338,7 +338,7 @@ const ParticipantList = ({
colorScheme="blue" colorScheme="blue"
disabled={!action || anyLoading} disabled={!action || anyLoading}
> >
{action || !anyLoading ? ( {!anyLoading ? (
<> <>
<Kbd color="blue.500" pt="1" mr="1"> <Kbd color="blue.500" pt="1" mr="1">
<FontAwesomeIcon <FontAwesomeIcon

View File

@@ -61,8 +61,6 @@ export default function TopicHeader({
}; };
useEffect(() => { useEffect(() => {
console.log(currentTopic?.id);
currentTopic?.id && currentTopic?.id &&
window.localStorage.setItem(transcriptId + "correct", currentTopic?.id); window.localStorage.setItem(transcriptId + "correct", currentTopic?.id);
}, [currentTopic?.id]); }, [currentTopic?.id]);

View File

@@ -179,7 +179,6 @@ const TopicPlayer = ({
mp3.media?.pause(); mp3.media?.pause();
setIsPlaying(false); setIsPlaying(false);
}; };
console.log(topicTime);
const isLoaded = !!(mp3.media && topicTime); const isLoaded = !!(mp3.media && topicTime);
return ( return (

View File

@@ -1,5 +1,4 @@
import { Dispatch, SetStateAction, useEffect } from "react"; import { Dispatch, SetStateAction, useEffect } from "react";
import WaveformLoading from "../../waveformLoading";
import { UseParticipants } from "../../useParticipants"; import { UseParticipants } from "../../useParticipants";
import { UseTopicWithWords } from "../../useTopicWithWords"; import { UseTopicWithWords } from "../../useTopicWithWords";
import { TimeSlice, selectedTextIsTimeSlice } from "./types"; import { TimeSlice, selectedTextIsTimeSlice } from "./types";

View File

@@ -18,7 +18,6 @@ const useTopics = (id: string): TranscriptTopics => {
const [error, setErrorState] = useState<Error | null>(null); const [error, setErrorState] = useState<Error | null>(null);
const { setError } = useError(); const { setError } = useError();
const api = useApi(); const api = useApi();
useEffect(() => { useEffect(() => {
if (!id || !api) return; if (!id || !api) return;

View File

@@ -26,9 +26,9 @@
"@vercel/edge-config": "^0.4.1", "@vercel/edge-config": "^0.4.1",
"autoprefixer": "10.4.14", "autoprefixer": "10.4.14",
"axios": "^1.6.2", "axios": "^1.6.2",
"chakra-react-select": "^4.7.6",
"eslint": "^8.56.0", "eslint": "^8.56.0",
"eslint-config-next": "^14.0.4", "eslint-config-next": "^14.0.4",
"chakra-react-select": "^4.7.6",
"fontawesome": "^5.6.3", "fontawesome": "^5.6.3",
"framer-motion": "^10.16.16", "framer-motion": "^10.16.16",
"jest-worker": "^29.6.2", "jest-worker": "^29.6.2",

View File

@@ -2087,9 +2087,9 @@ camelcase@^6.3.0:
integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==
caniuse-lite@^1.0.30001406, caniuse-lite@^1.0.30001464, caniuse-lite@^1.0.30001503: caniuse-lite@^1.0.30001406, caniuse-lite@^1.0.30001464, caniuse-lite@^1.0.30001503:
version "1.0.30001515" version "1.0.30001572"
resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001515.tgz" resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001572.tgz"
integrity sha512-eEFDwUOZbE24sb+Ecsx3+OvNETqjWIdabMy52oOkIgcUtAsQifjUG9q4U9dgTHJM2mfk4uEPxc0+xuFdJ629QA== integrity sha512-1Pbh5FLmn5y4+QhNyJE9j3/7dK44dGB83/ZMjv/qJk86TvDbjk0LosiZo0i0WB0Vx607qMX9jYrn1VLHCkN4rw==
chakra-react-select@^4.7.6: chakra-react-select@^4.7.6:
version "4.7.6" version "4.7.6"