|
1 | | -import MainBanner from "./components/MainBanner"; |
2 | 1 | import { Container, Typography, Theme, Input, Button } from "@mui/material"; |
3 | 2 | import { toast, ToastContainer } from "react-toastify"; |
4 | | -import PseudoLabLogo from "../../components/common/PseudoLabLogo"; |
5 | 3 | import { styled } from "@mui/system"; |
| 4 | +import { useState } from "react"; |
6 | 5 |
|
7 | 6 | const StyledContainer = styled(Container)({ |
8 | 7 | textAlign: "center", |
9 | 8 | padding: (theme: Theme) => theme.spacing(4), |
10 | 9 | }); |
11 | 10 |
|
12 | | -const Title = styled(Typography)({ |
13 | | - fontSize: "2.5rem", |
14 | | - fontWeight: "bold", |
15 | | - marginBottom: (theme: Theme) => theme.spacing(2), |
16 | | - color: (theme: Theme) => theme.palette.primary.main, |
17 | | -}); |
18 | | - |
19 | | -const Description = styled(Typography)({ |
20 | | - fontSize: "1.2rem", |
21 | | - marginBottom: (theme: Theme) => theme.spacing(4), |
22 | | -}); |
23 | | - |
24 | 11 | const InputBox = styled(Input)({ |
25 | 12 | marginTop: "1rem", |
26 | 13 | }); |
27 | 14 |
|
28 | 15 | const Home = () => { |
29 | | - let loginId = ""; |
30 | | - let password = ""; |
| 16 | + const [loginId, setLoginId] = useState(""); |
| 17 | + const [password, setPassword] = useState(""); |
31 | 18 | const handLogin = () => { |
32 | 19 | console.log(loginId); |
33 | 20 | console.log(password); |
@@ -89,15 +76,18 @@ const Home = () => { |
89 | 76 | placeholder="아이디 입력" |
90 | 77 | value={loginId} |
91 | 78 | onChange={async (event: React.ChangeEvent<HTMLInputElement>) => { |
92 | | - loginId = event.target.value; |
| 79 | + setLoginId(event.target.value); |
93 | 80 | }} |
94 | 81 | ></InputBox> |
95 | 82 |
|
| 83 | + <br /> |
| 84 | + |
96 | 85 | <InputBox |
97 | 86 | placeholder="비밀번호 입력" |
98 | 87 | value={password} |
| 88 | + type="Password" |
99 | 89 | onChange={async (event: React.ChangeEvent<HTMLInputElement>) => { |
100 | | - password = event.target.value; |
| 90 | + setPassword(event.target.value); |
101 | 91 | }} |
102 | 92 | ></InputBox> |
103 | 93 | <br /> |
|
0 commit comments