Skip to content

Commit

Permalink
fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
highvolt-dev committed Jan 23, 2022
1 parent f187693 commit b139793
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function useInterval(callback, delay) {
}

function App() {
const [model, setModel] = useState(null);
const [model, setModel] = useState('');
const [data, setData] = useState([]);
const [login, setLogin] = useState({username: 'admin', password: '', error: ''});
const [loggedIn, setLoggedIn] = useState(false);
Expand Down Expand Up @@ -281,10 +281,10 @@ function App() {
{model ?
<>Selected: {model} <button onClick={(e) => {setModel('')}}>Change Selection</button></>
:
<select name="model" onChange={(e) => {setModel(e.target.value)}}>
<select name="model" value={model} onChange={(e) => {setModel(e.target.value)}}>
<option value="">Select a Model</option>
<option value="NOK5G21" selected={model === "NOK5G21"}>Nokia (Silver Cylinder)</option>
<option value="ARCKVD21" selected={model === "ARCKVD21"}>Arcadyan (Black Cube)</option>
<option value="NOK5G21">Nokia (Silver Cylinder)</option>
<option value="ARCKVD21">Arcadyan (Black Cube)</option>
</select>
}
</section>
Expand Down

0 comments on commit b139793

Please sign in to comment.