diff --git a/src/views/Selection/TranCont.js b/src/views/Selection/TranCont.js index 764fdd8..2f5712e 100644 --- a/src/views/Selection/TranCont.js +++ b/src/views/Selection/TranCont.js @@ -8,6 +8,7 @@ import { useEffect, useState } from "react"; import { apiTranslate, apiBaiduLangdetect } from "../../apis"; import CopyBtn from "./CopyBtn"; import Typography from "@mui/material/Typography"; +import Alert from "@mui/material/Alert"; export default function TranCont({ text, @@ -59,7 +60,13 @@ export default function TranCont({ if (simpleStyle) { return ( - {trText} + {error ? ( + {error} + ) : loading ? ( + + ) : ( + {trText} + )} ); }