|
1 |
| -import ClickScungus from '../hooks/ClickScungus'; |
2 |
| -import LoadScungus from '../hooks/LoadScungus'; |
3 |
| -import ResetScungus from '../hooks/ResetScungus'; |
4 |
| -import SaveScungus from '../hooks/SaveScungus'; |
5 |
| -import './app.css'; |
| 1 | +import React from "react"; |
| 2 | + |
| 3 | +import ClickScungus from "../hooks/ClickScungus"; |
| 4 | +import LoadScungus from "../hooks/LoadScungus"; |
| 5 | +import ResetScungus from "../hooks/ResetScungus"; |
| 6 | +import SaveScungus from "../hooks/SaveScungus"; |
| 7 | +import "./app.css"; |
6 | 8 |
|
7 | 9 | const App = () => {
|
| 10 | + const handleKeyDown = (event: React.KeyboardEvent<HTMLInputElement>) => { |
| 11 | + if (["CapsLock", "Alt"].indexOf(event.key) !== -1) { |
| 12 | + event.preventDefault(); |
| 13 | + event.stopPropagation(); |
| 14 | + } |
| 15 | + console.log(`${event.key}\nhello ultra!!!`); |
| 16 | + }; |
| 17 | + |
8 | 18 | return (
|
9 |
| - <div className='root' style={{display: 'flex', width: '100%'}}> |
10 |
| - <div className='side left'> |
11 |
| - <div className='title-text heading'> |
12 |
| - <h1>this is scungus:)</h1> |
13 |
| - </div> |
14 |
| - <div className='text center top'> |
15 |
| - you can click on scungus:) |
16 |
| - <br /> |
17 |
| - doing so will increase your scungus:) |
18 |
| - <br /> |
19 |
| - try it~! |
20 |
| - </div> |
21 |
| - <div className='button scungus padding'> |
22 |
| - <ClickScungus /> |
23 |
| - </div> |
| 19 | + <div |
| 20 | + className="root" |
| 21 | + style={{ display: "flex", width: "100%" }} |
| 22 | + onKeyDown={handleKeyDown} |
| 23 | + > |
| 24 | + <div className="side left"> |
| 25 | + <div className="title-text heading"> |
| 26 | + <h1>this is scungus:)</h1> |
| 27 | + </div> |
| 28 | + <div className="text center top"> |
| 29 | + you can click on scungus:) |
| 30 | + <br /> |
| 31 | + doing so will increase your scungus:) |
| 32 | + <br /> |
| 33 | + try it~! |
| 34 | + </div> |
| 35 | + <div className="button scungus padding"> |
| 36 | + <ClickScungus /> |
| 37 | + </div> |
24 | 38 | </div>
|
25 |
| - <div className='side right'> |
| 39 | + <div className="side right"> |
26 | 40 | <br />
|
27 | 41 | <SaveScungus />
|
28 | 42 | <br />
|
|
0 commit comments