Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
as6325400 committed Aug 30, 2024
1 parent 1d2fb1c commit 05fdb1e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/components/pages/login/loginarea.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,18 @@ const focusNext = (event, index) => {
};
const focusPre = (event, index) => {
if (event.key === "Backspace" && index > 0 && inputs.value[index] === "") {
if (
event.key === "Backspace" &&
index > 0 &&
inputs.value[index] === ""
) {
inputs.value[index - 1] = "";
event.target.previousElementSibling.focus();
}
};
const apiSite = `${env.VITE_BACKEND_DEVICE}/`;
async function handleSubmit() {
const code = inputs.value.join("");
const res = await axios.post(`${apiSite}login`, { otp: code });
Expand Down

0 comments on commit 05fdb1e

Please sign in to comment.