Home.jsx 1.52 KB
Newer Older
Sangjune Bae's avatar
Sangjune Bae committed
1
2
3
4
import React from "react";
import Button from "react-bootstrap/Button";
import Form from "react-bootstrap/Form";
import Container from "react-bootstrap/Container";
Sangjune Bae's avatar
Sangjune Bae committed
5
// import { Link } from "react-router-dom";
Sangjune Bae's avatar
Sangjune Bae committed
6
import { Redirect } from "react-router-dom";
Sangjune Bae's avatar
Sangjune Bae committed
7
8
9
10
import Row from "react-bootstrap/Row";
import Col from "react-bootstrap/Col";
import Image from 'react-bootstrap/Image'

Sangjune Bae's avatar
.    
Sangjune Bae committed
11
12
import mainlogo from '../picture/mainlogo.jpg'

Sangjune Bae's avatar
Sangjune Bae committed
13
14
15
// import Modal from "react-bootstrap/Modal";
// import 'bootstrap / dist / css / bootstrap.min.css';

Sangjune Bae's avatar
Sangjune Bae committed
16

Sangjune Bae's avatar
Sangjune Bae committed
17
18
19
function Home() {
    const clickSubmit = (event) => {
        event.preventDefault();
Sangjune Bae's avatar
Sangjune Bae committed
20
21
        console.log("버튼실행 = 메인으로 넘기기 ")
        return <Redirect to="/main"/>
Sangjune Bae's avatar
Sangjune Bae committed
22
23
24
25
26
27
28
    };

    // if (values.redirect) {
    //     return <Redirect to="/" />;
    //   }

    return (
Sangjune Bae's avatar
Sangjune Bae committed
29

Sangjune Bae's avatar
Sangjune Bae committed
30
        <Container className="col-sm-6 col-md-5 col-lg-4 p-5">
Sangjune Bae's avatar
Sangjune Bae committed
31
            {/* <Row> */}
Sangjune Bae's avatar
.    
Sangjune Bae committed
32
            <Image src={mainlogo} rounded />
Sangjune Bae's avatar
Sangjune Bae committed
33
34
            <Form>
                <Form.Group controlId="inputbox">
Sangjune Bae's avatar
Sangjune Bae committed
35
                    <Form.Label>오늘! 어디가?</Form.Label>
Sangjune Bae's avatar
Sangjune Bae committed
36
37
38
39
40
41
42
                    <Form.Control
                    />
                    <Form.Text className="text-muted">
                        관광지를 입력하면 관련된 정보들이 나옵니다.
          </Form.Text>
                </Form.Group>

Sangjune Bae's avatar
Sangjune Bae committed
43
                <Button variant="danger" type="submit" onClick={clickSubmit}>관광지 검색하기</Button>
Sangjune Bae's avatar
Sangjune Bae committed
44

Sangjune Bae's avatar
Sangjune Bae committed
45
            </Form>
Sangjune Bae's avatar
Sangjune Bae committed
46
47
48
           
            {/* </Row> */}

Sangjune Bae's avatar
Sangjune Bae committed
49
50
51
52
        </Container>
    );
}

Sangjune Bae's avatar
Sangjune Bae committed
53
export default Home;