chore: Fix backspace functionality in Calculator component
This commit is contained in:
parent
1194ea677e
commit
618c2fe487
1 changed files with 5 additions and 0 deletions
|
|
@ -137,6 +137,11 @@ export function Calculator({ active }: WindowProps) {
|
|||
case "%":
|
||||
addInput("%");
|
||||
break;
|
||||
case "Backspace":
|
||||
if (input != null && input.length > 0) {
|
||||
setInput(input.slice(0, -1));
|
||||
}
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue