diff --git a/client/src/components/Utilities/GetCoordinates/GetCoordinates.tsx b/client/src/components/Utilities/GetCoordinates/GetCoordinates.tsx index 148a1ef8..2c91745d 100644 --- a/client/src/components/Utilities/GetCoordinates/GetCoordinates.tsx +++ b/client/src/components/Utilities/GetCoordinates/GetCoordinates.tsx @@ -19,7 +19,6 @@ import { getGenomicCoords, getExonCoords } from "../../../services/main"; import { CoordsUtilsResponse, GenomicData, - GetGeneTranscriptsResponse, } from "../../../services/ResponseModels"; import StrandSwitch from "../../main/shared/StrandSwitch/StrandSwitch"; import TabHeader from "../../main/shared/TabHeader/TabHeader"; diff --git a/client/src/components/Utilities/GetSequence/GetSequence.tsx b/client/src/components/Utilities/GetSequence/GetSequence.tsx index c39ae5e6..0c6bd707 100644 --- a/client/src/components/Utilities/GetSequence/GetSequence.tsx +++ b/client/src/components/Utilities/GetSequence/GetSequence.tsx @@ -13,6 +13,7 @@ import HelpTooltip from "../../main/shared/HelpTooltip/HelpTooltip"; import { HelpPopover } from "../../main/shared/HelpPopover/HelpPopover"; import TabHeader from "../../main/shared/TabHeader/TabHeader"; import TabPaper from "../../main/shared/TabPaper/TabPaper"; +import LoadingMessage from "../../main/shared/LoadingMessage/LoadingMessage"; const GetSequenceIds: React.FC = () => { const [inputSequence, setInputSequence] = useState(""); @@ -20,15 +21,18 @@ const GetSequenceIds: React.FC = () => { const [refseqId, setRefseqId] = useState(""); const [ga4ghId, setGa4ghId] = useState(""); const [aliases, setAliases] = useState([]); + const [isLoading, setIsLoading] = useState(false); useEffect(() => { if (inputSequence) { + setIsLoading(true); getSequenceIds(inputSequence).then((sequenceIdsResponse) => { if (sequenceIdsResponse.warnings) { setHelperText("Unrecognized sequence"); setRefseqId(""); setGa4ghId(""); setAliases([]); + setIsLoading(false); } else { if (sequenceIdsResponse.refseq_id) { setRefseqId(sequenceIdsResponse.refseq_id); @@ -40,6 +44,7 @@ const GetSequenceIds: React.FC = () => { setAliases(sequenceIdsResponse.aliases); } setHelperText(""); + setIsLoading(false); } }); } @@ -184,7 +189,7 @@ const GetSequenceIds: React.FC = () => { ); - const renderedIdInfo = ( + const renderedIdInfo = isLoading ? () : (