diff --git a/src/App.jsx b/src/App.jsx index ecfe0ca..10cd48d 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -1,4 +1,4 @@ -import React, { useState } from "react"; +import { useState } from "react"; import "./App.css"; const App = () => { @@ -10,15 +10,13 @@ const App = () => { setError(""); setCount((prevCount) => prevCount + 1); } else { - setError("Value Cannot be greater than 10"); + setError("Value cannot be greater than 10"); } }; const handleDec = () => { if (count > 0) { setError(""); setCount((prevCount) => prevCount - 1); - } else { - setError("Value Cannot be less than 0"); } }; const handleReset = () => { @@ -33,7 +31,7 @@ const App = () => { Count :{" "} = 0 && count <= 6 ? "#000" : "red", + color: count >= 10 ? "red" : "#000", }} > {" "} @@ -43,7 +41,7 @@ const App = () => { {error &&

{error}

}
-