login.tsx 2.47 KB
Newer Older
Kim, MinGyu's avatar
signup    
Kim, MinGyu committed
1
import { Link, } from "react-router-dom";
Kim, MinGyu's avatar
Kim, MinGyu committed
2
import React, { useState } from "react";
Kim, MinGyu's avatar
처음    
Kim, MinGyu committed
3

Kim, MinGyu's avatar
Kim, MinGyu committed
4
5
6
interface login {
    id : string;
    password : string;
Kim, MinGyu's avatar
signup    
Kim, MinGyu committed
7

Kim, MinGyu's avatar
Kim, MinGyu committed
8
}
Kim, MinGyu's avatar
signup    
Kim, MinGyu committed
9

Kim, MinGyu's avatar
Kim, MinGyu committed
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
const fake = {id : "asdf", password : "qwer"}

function Logindata(fake :login){
    const [id, setId] = useState("");
    const [password, setPassword] = useState("");


   return( <div className="flex flex-col md:w-2/3 md:gap-2">

        <input className="placeholder:text-slate-300
            bg-white border border-slate-500 rounded-2xl
            py-2 pl-9 pr-3 
            focus:border-black
            " placeholder="Id" type="text" name="Id" 
            onChange={(e) => setId(e.target.value)} />
        <input className="placeholder:italic placeholder:text-slate-300
            bg-white border border-slate-500 rounded-2xl
            py-2 pl-9 pr-3 
            focus:border-black
            " placeholder="Password" type="text" name="Password"
            onChange={(e) => setPassword(e.target.value)} />

    </div>
    
    )
}

export default function Login() {
Kim, MinGyu's avatar
처음    
Kim, MinGyu committed
38
39
    return (

Kim, MinGyu's avatar
Kim, MinGyu committed
40
41
42
43
44
45
        <div>
            {/* <form onSubmit={loginsubmit}> */}
                <div className="flex flex-row grid grid-rows-2">

                    <div className=" p-12 w-1/2 h-1/2 md:w-40 md:h-40 bg-red-400 place-self-center rounded-2xl">
                        <Link to="/">Travel Report</Link>
Kim, MinGyu's avatar
처음    
Kim, MinGyu committed
46
47
                    </div>

Kim, MinGyu's avatar
Kim, MinGyu committed
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
                    <div className=" flex-row w-auto h-60 md:w-1/2 bg-white border-2 border-black grid place-items-center rounded-xl place-self-center">

                        <div className="flex flex-col w-full  md:flex-row md:p-20 md:gap-10">

                            <Logindata id={""} password={""} />

                            <button type="submit" className="md:w-1/3 bg-sky-600 hover:bg-sky-700 rounded-xl">
                                login
                            </button>
                        </div>
                        <div className="flex-row grid grid-cols-3">
                            <button className="bg-white bottom-0 right-0">
                                <Link to="/signup">회원가입</Link>
                            </button>
                            <div></div>
                            <button className="bg-white inset-x-0">
                                <Link to="/forgot">비밀번호 찾기</Link>
                            </button>
                        </div>
                    </div>


Kim, MinGyu's avatar
처음    
Kim, MinGyu committed
70
                </div>
Kim, MinGyu's avatar
Kim, MinGyu committed
71
72
            {/* </form> */}
        </div> // Login Page
Kim, MinGyu's avatar
처음    
Kim, MinGyu committed
73
    );
Kim, MinGyu's avatar
Kim, MinGyu committed
74
}