fix(translator): Ensure loading state is reset after error handling in TranslatorPage

This commit is contained in:
decolua 2026-03-12 15:45:41 +07:00
parent 83d94daa82
commit 372b985ee9
2 changed files with 6 additions and 3 deletions

View file

@ -180,8 +180,11 @@ export default function TranslatorPage() {
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ file: "5_res_provider.txt", content: full })
});
} catch (e) { alert(e.message); }
setLoad("send", false);
} catch (e) {
alert(e.message);
} finally {
setLoad("send", false);
}
};
const handleCopy = async (id) => {