File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change 1
1
import logo from './logo.svg' ;
2
2
import './App.css' ;
3
- import Button from './components/Button/Button' ;
4
3
import Scan from './containers/Scan' ;
5
4
import Write from './containers/Write' ;
5
+ import { useState } from 'react' ;
6
6
7
7
function App ( ) {
8
+ const [ isScan , setScan ] = useState ( false ) ;
9
+ const [ isWrite , setWrite ] = useState ( false ) ;
10
+
8
11
return (
9
12
< div className = "App" >
10
- < Button name = "Scan" />
11
- < Button name = "Write" />
12
- < Scan />
13
- < Write />
13
+ < img src = { logo } className = "App-logo" alt = "logo" />
14
+ < button onClick = { ( ) => setScan ( ! isScan ) } className = "" > Scan</ button >
15
+ < button onClick = { ( ) => setWrite ( ! isWrite ) } className = "" > Write</ button >
16
+ { isScan && < Scan /> }
17
+ { isWrite && < Write /> }
18
+
14
19
</ div >
15
20
) ;
16
21
}
You can’t perform that action at this time.
0 commit comments