Skip to content

Commit

Permalink
app shel functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
Patricio Vargas committed Aug 10, 2021
1 parent df092a5 commit 64348c4
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions src/App.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import logo from './logo.svg';
import logo from './logo.png';
import './App.css';
import Scan from './containers/Scan';
import Write from './containers/Write';
Expand All @@ -8,11 +8,24 @@ function App() {
const [isScan, setScan] = useState(false);
const [isWrite, setWrite] = useState(false);

const onHandleScan =()=>{
setScan(!isScan);
setWrite(false)
}

const onHandleWrite =()=>{
setScan(false);
setWrite(!isWrite)
}

return (
<div className="App">
<img src={logo} className="App-logo" alt="logo" />
<button onClick={()=>setScan(!isScan)} className="">Scan</button>
<button onClick={()=>setWrite(!isWrite)} className="">Write</button>
<h1>NFC Tool</h1>
<div className="App-container">
<button onClick={onHandleScan} className="App-button">Scan</button>
<button onClick={onHandleWrite} className="App-button">Write</button>
</div>
{isScan && <Scan/>}
{isWrite && <Write/>}

Expand Down

0 comments on commit 64348c4

Please sign in to comment.