refactor: Split config files

This commit is contained in:
Gabe
2025-09-01 18:56:48 +08:00
parent c4fba1c905
commit 2bfb27f346
17 changed files with 821 additions and 863 deletions

View File

@@ -43,14 +43,14 @@ export default function TranCont({
const apiSetting =
transApis[translator] || DEFAULT_TRANS_APIS[translator];
const tranRes = await apiTranslate({
const [trText] = await apiTranslate({
text,
translator,
fromLang,
toLang: to,
apiSetting,
});
setTrText(tranRes[0]);
setTrText(trText);
} catch (err) {
setError(err.message);
} finally {