UserInfo.js 2.72 KB
Newer Older
Spark's avatar
Spark committed
1
import React, { useState } from 'react'
Spark's avatar
Spark committed
2
import { Row, Card, Button, Col, Modal } from 'react-bootstrap';
3
import '../App.css'
Spark's avatar
Spark committed
4
import { Link } from 'react-router-dom';
5
6


Spark's avatar
Spark committed
7
function UserInfo() {
Spark's avatar
Spark committed
8

Spark's avatar
Spark committed
9
10
11
12
    const nickname = localStorage.getItem('nickname')
    const localname_doe = localStorage.getItem('name_doe')
    const localname_sgg = localStorage.getItem('name_sgg')
    const localname_emd = localStorage.getItem('name_emd')
Spark's avatar
Spark committed
13

14
15
    const cardstyled = {
        margin: 'auto',
Spark's avatar
Spark committed
16
17
        paddingTop: '1em',
        paddingBottom: '1em',
18
19
20
21
22
23
        display: 'flex',
        justifyContent: 'center',
        width: '100%',
        borderWidth: '3px',
        borderRadius: '20px',
        borderColor: 'rgba(195, 195, 195, 0.753)',
Spark's avatar
Spark committed
24
25
26
27
        // color: '#04AB70'
        color: 'rgb(110, 189, 142)',


28
29
30
31
32
    }
    const btnstyled2 = {
        background: 'white',
        margin: 'auto',
        borderWidth: '2px',
Spark's avatar
Spark committed
33
34
        // padding: '0',
        fontSize: '0.7em',
35
36
        color: 'rgb(110, 189, 142)',
        borderColor: 'rgba(195, 195, 195, 0.753)',
Spark's avatar
Spark committed
37
38
        // borderRadius: '20px',
        width: '50%'
39
    }
Spark's avatar
Spark committed
40

41
    return (
Spark's avatar
Spark committed
42
        <Row>
43
44
45
            <Col className='text-center pt-3 pb-2 px-0'>
                <Card style={cardstyled} id='localName'>
                    <Card.Title>
Spark's avatar
Spark committed
46
                        {nickname ?
Spark's avatar
Spark committed
47
                            `${nickname}`
Spark's avatar
Spark committed
48
49
50
51
                            :
                            <>
                                GUEST
                            </>
Spark's avatar
Spark committed
52
                        }, 환영합니다.
53
                    </Card.Title>
Spark's avatar
Spark committed
54
                    <Row style={{ alignItems: 'center', margin: 'auto', justifyContent: 'center' }}>
Spark's avatar
Spark committed
55
                        <Card.Subtitle className='py-3' style={{fontSize: '0.9em'}}>
Spark's avatar
Spark committed
56
57
58
59
60
61
62
                            {localname_emd ?
                                `${localname_doe} ${localname_sgg} ${localname_emd}`
                                :
                                <>
                                    지역을 입력해 주세요
                                </>
                            }
63
                        </Card.Subtitle>
Spark's avatar
Spark committed
64
                        {nickname &&
Spark's avatar
Spark committed
65
66
                            <Button variant='light' className='m-auto d-flex' style={btnstyled2}>
                                <Link to='/local_code' className='w-100' style={{ textDecoration: 'none', color: 'rgb(110, 189, 142)' }}>
Spark's avatar
Spark committed
67
68
                                    변경
                                </Link>
Spark's avatar
Spark committed
69
70
                            </Button>
                        }
71
                    </Row>
Spark's avatar
Spark committed
72
                    <hr />
73
74
75
76
77

                    환경을 향한 노력 <br />
                    <strong>OOO  </strong>
                </Card>
            </Col>
Spark's avatar
Spark committed
78
        </Row>
79
80
    )
}
Spark's avatar
Spark committed
81
export default UserInfo;