From 0a4fa7b9f8dff05bd306cab49b8481e7c1d85be2 Mon Sep 17 00:00:00 2001 From: Gabe Yuan Date: Wed, 17 Apr 2024 10:03:56 +0800 Subject: [PATCH] fix: tranbox ui --- src/views/Selection/TranCont.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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} + )} ); }