Home.jsx 1.5 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
11
12
13
14
import Row from "react-bootstrap/Row";
import Col from "react-bootstrap/Col";
import Image from 'react-bootstrap/Image'

import logo from './mainlogo.jpg'
// import Modal from "react-bootstrap/Modal";
// import 'bootstrap / dist / css / bootstrap.min.css';

Sangjune Bae's avatar
Sangjune Bae committed
15

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

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

    return (
Sangjune Bae's avatar
Sangjune Bae committed
28

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

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

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

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

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