diff --git a/README.md b/README.md index d9020d8..02e7e1d 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,7 @@ # My Calculator -This project showcases a Vue.js-based calculator application, highlighting both the framework’s powerful capabilities and my expertise in web development. The calculator is designed to perform basic arithmetic operations, including addition, subtraction, multiplication, and division. It also supports percentage calculations and negative number operations. Link: https://kluge7.github.io/my-calculator/ +This project showcases a Vue.js-based calculator application, highlighting both the framework’s powerful capabilities and my expertise in web development. The calculator is designed to perform basic arithmetic operations, including addition, subtraction, multiplication, and division. It also supports percentage calculations and negative number operations. + +**This calculator is fully optimized for mobile devices and can be seamlessly used on your phone.** + +Link: https://kluge7.github.io/my-calculator/ diff --git a/src/components/TextSection.vue b/src/components/TextSection.vue index fdd7f4c..1996f0b 100644 --- a/src/components/TextSection.vue +++ b/src/components/TextSection.vue @@ -8,6 +8,9 @@ multiplication, and division. It also supports percentage calculations and negative number operations.
++ My Calculator is fully optimized for mobile devices and can be seamlessly used on your phone. +
diff --git a/src/components/calculator/SimpleCalculator.vue b/src/components/calculator/SimpleCalculator.vue index 3876b07..257aaad 100644 --- a/src/components/calculator/SimpleCalculator.vue +++ b/src/components/calculator/SimpleCalculator.vue @@ -8,10 +8,7 @@ import { evaluate } from 'mathjs' const displayValue = ref('') const handleCalculatorButtonClick = (value: string) => { - if ( - (displayValue.value === 'Error' || parseFloat(displayValue.value) === Infinity) && - value !== '=' - ) { + if (((displayValue.value === 'Error') || (parseFloat(displayValue.value) === Infinity) || isNaN(parseFloat(displayValue.value))) && value !== '=') { displayValue.value = '' } if (value === 'AC') {