정의왕

Login ver1.1.1(modify value)

1 <component name="InspectionProjectProfileManager"> 1 <component name="InspectionProjectProfileManager">
2 <profile version="1.0"> 2 <profile version="1.0">
3 <option name="myName" value="Project Default" /> 3 <option name="myName" value="Project Default" />
4 + <inspection_tool class="DuplicatedCode" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
4 <inspection_tool class="Eslint" enabled="true" level="WARNING" enabled_by_default="true" /> 5 <inspection_tool class="Eslint" enabled="true" level="WARNING" enabled_by_default="true" />
5 </profile> 6 </profile>
6 </component> 7 </component>
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -3,18 +3,18 @@ import "../style/LoginPage.scss"; ...@@ -3,18 +3,18 @@ import "../style/LoginPage.scss";
3 import { Icon, Input } from "semantic-ui-react" 3 import { Icon, Input } from "semantic-ui-react"
4 4
5 function LoginPage() { 5 function LoginPage() {
6 - const [Id, setId] = useState(""); 6 + const [Email, setEmail] = useState("");
7 const [Password, setPassword] = useState(""); 7 const [Password, setPassword] = useState("");
8 8
9 const onIdHandler = (event) => { 9 const onIdHandler = (event) => {
10 - setId(event.currentTarget.value); 10 + setEmail(event.currentTarget.value);
11 }; 11 };
12 const onPasswordHandler = (event) => { 12 const onPasswordHandler = (event) => {
13 setPassword(event.currentTarget.value); 13 setPassword(event.currentTarget.value);
14 }; 14 };
15 const onSubmitHandler = (event) => { 15 const onSubmitHandler = (event) => {
16 event.preventDefault(); 16 event.preventDefault();
17 - console.log("Id", Id); 17 + console.log("Email", Email);
18 console.log("Password", Password); 18 console.log("Password", Password);
19 }; 19 };
20 return ( 20 return (
...@@ -28,7 +28,7 @@ function LoginPage() { ...@@ -28,7 +28,7 @@ function LoginPage() {
28 iconPosition='left' 28 iconPosition='left'
29 placeholder="Email" 29 placeholder="Email"
30 type="text" 30 type="text"
31 - value={Id} 31 + value={Email}
32 autoComplete="off" 32 autoComplete="off"
33 onChange={onIdHandler}/> 33 onChange={onIdHandler}/>
34 </div> 34 </div>
......
1 -import React from "react"; 1 +import React, { useState } from "react";
2 +import "../style/RegisterPage.scss";
3 +import { Icon, Input } from "semantic-ui-react"
2 4
3 function RegisterPage() { 5 function RegisterPage() {
4 - return <div>Register</div>; 6 + const [Email, setEmail] = useState("");
7 + const [Password, setPassword] = useState("");
8 +
9 + const onIdHandler = (event) => {
10 + setEmail(event.currentTarget.value);
11 + };
12 + const onPasswordHandler = (event) => {
13 + setPassword(event.currentTarget.value);
14 + };
15 + const onSubmitHandler = (event) => {
16 + event.preventDefault();
17 + console.log("Email",Email);
18 + console.log("Password", Password);
19 + };
20 + return (
21 + <div id="body">
22 + <div className="register-form">
23 + <form onSubmit={onSubmitHandler}>
24 + <h1>Tunnel</h1>
25 + <div className="input-area">
26 + <Input
27 + icon={<Icon name='at'/>}
28 + iconPosition='left'
29 + placeholder="Email"
30 + type="text"
31 + value={Email}
32 + autoComplete="off"
33 + onChange={onIdHandler}/>
34 + </div>
35 + <div className="input-area">
36 + <Input
37 + icon={<Icon name='lock'/>}
38 + iconPosition='left'
39 + placeholder="Password"
40 + type="password"
41 + value={Password}
42 + autoComplete="off"
43 + onChange={onPasswordHandler}/>
44 + </div>
45 + <div className="btn-area">
46 + <button className="register-btn" >Register</button>
47 + </div>
48 + </form>
49 + </div>
50 + </div>
51 + );
5 } 52 }
6 53
7 export default RegisterPage; 54 export default RegisterPage;
......
1 +* {
2 + margin: 0;
3 + padding: 0;
4 + box-sizing: border-box;
5 +}
6 +#body{
7 + display: flex;
8 + justify-content: center;
9 + align-items: center;
10 + height: 100vh;
11 + background-image: url("../images/login_background.png");
12 + background-repeat: no-repeat;
13 + background-position: center;
14 + .register-form {
15 + display: flex;
16 + justify-content: space-around;
17 + align-items: center;
18 + flex-direction: row;
19 + width: 500px;
20 + height: 620px;
21 + box-shadow: 0px 0px 20px #000;
22 + }
23 + h1 {
24 + font-size: 40px;
25 + color: white;
26 + font-weight: bold;
27 + text-align: center;
28 + margin-bottom: 60px ;
29 + }
30 + .input-area {
31 + display: flex;
32 + justify-content: center;
33 + align-items: center;
34 + width: 400px;
35 + position: relative;
36 + margin-top: 20px;
37 + font-weight: bold;
38 + font-size: medium;
39 +
40 + input {
41 + width: 75%;
42 + padding: 15px .8em .8em;
43 + background-color: transparent;
44 + border: 2px solid white;
45 + border-radius: 30px;
46 + font-size: 18px;
47 + color: white;
48 + outline: none;
49 + }
50 +
51 + label {
52 + position: absolute;
53 + left: 10px;
54 + top: -2px;
55 + font-size: 14px;
56 + color: white;
57 + }
58 + }
59 + .btn-area {
60 + display: flex;
61 + justify-content: space-evenly;
62 + margin-top: 30px;
63 +
64 + .register-btn {
65 + width: 150px;
66 + height: 50px;
67 + background-color: transparent;
68 + font-size: 20px;
69 + color: white;
70 + border: 2px solid white;
71 + font-weight: bold;
72 + border-radius: 25px;
73 + cursor: pointer;
74 + }
75 + }
76 +}
77 +
......