Footer.js 5.01 KB
Newer Older
1
2
3
4
import React, { useEffect, useRef, useState } from 'react'
import { Container, Row, Card, Table, Button, Col, Modal, ModalTitle, Overlay, Tooltip } from 'react-bootstrap';
import { CopyToClipboard } from 'react-copy-to-clipboard';
import '../App.css'
Spark's avatar
layout    
Spark committed
5
6

function Footer() {
7
    const cardstyled = {
Spark's avatar
layout    
Spark committed
8
9
10
11
12
13
        fontSize: '0.5em',
        margin: 'auto',
        padding: '1em',
        display: 'flex',
        justifyContent: 'center',
        width: '100%',
14
15
16
        borderWidth: '1.5px',
        borderRadius: '20px',
        borderColor: '#04AB70',
Spark's avatar
layout    
Spark committed
17
18
        color: 'rgb(110, 189, 142)'
    }
19

Spark's avatar
layout    
Spark committed
20
    const btnstyled = {
21
        background: 'white',
Spark's avatar
layout    
Spark committed
22
        margin: '1px',
23
        maxWidth: 'fit-content',
Spark's avatar
layout    
Spark committed
24
25
        borderWidth: '2px',
        fontSize: '10px',
26
        color: 'rgb(110, 189, 142)',
Spark's avatar
layout    
Spark committed
27
28
        borderColor: 'rgba(195, 195, 195, 0.753)',
        borderRadius: '20px',
29

Spark's avatar
layout    
Spark committed
30
31
    }

32
    const [donateShow, setDonateShow] = useState(false);
Spark's avatar
layout    
Spark committed
33

34
35
36

    function clickAndCopy() {
        return new Promise((resolve) => setTimeout(resolve, 2000))
Spark's avatar
layout    
Spark committed
37
    }
38
39
40
41
42
43
44
45
46
47
48
49
50
51

    // function CopyShow() {
    const [isCopyshow, setCopyShow] = useState(false);

    useEffect(() => {
        if (isCopyshow) {
            clickAndCopy().then(() => {
                setCopyShow(false);
            });
        }
    }, [isCopyshow]);

    // }
    const handleClick = () => setCopyShow(true);
Spark's avatar
layout    
Spark committed
52
53

    return (
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
        <Row className='text-center w-100 my-2'>
            <Card style={cardstyled}>
                <Row className='my-1 d-flex justify-content-center' style={{ fontSize: '15px', color: 'rgb(109, 110, 109)' }}>
                    서버비용 후원하기
                </Row>
                <Row className='my-1 d-flex justify-content-center'>
                    이용하시는데 불편함이 없도록 광고 없이 운영하고 있습니다. <br />
                    서버비용 충당  후원금이 남을시 UNICEF  기부하겠습니다.
                </Row>
                <Row className='my-1 d-flex justify-content-center'>
                    <Button variant='light' style={btnstyled} onClick={() => setDonateShow(true)}>
                         후원하기
                    </Button>
                    <Modal
                        size='sm'
                        show={donateShow}
                        onHide={() => setDonateShow(false)}
                        style={{ top: '80px', left: '1vw' }}
                    >
                        <Modal.Header className='d-flex justify-content-center'>
                            <Modal.Title style={{fontSize: '1em'}}>
                                Thank you for your Donation
                            </Modal.Title>
                        </Modal.Header>
                        <Modal.Body>
                            <Col className='d-flex justify-content-center text-center' style={{ flexDirection: 'column' }}>
                                <p style={{ color: 'rgb(109, 110, 109)', margin: '1em', fontSize: '15px' }}>
                                    카카오뱅크
                                </p>
                                <CopyToClipboard text={'박상호 3333-16-7299769'}>
                                    <p className='m-auto' style={btnstyled} >
                                        박상호 3333-16-7299769
                                        <Button variant='light'
                                            disabled={isCopyshow}
                                            onClick={!isCopyshow ? handleClick : null}
                                            style={{
                                                background: 'lightgray',
                                                margin: '5px',
                                                maxWidth: 'fit-content',
                                                borderWidth: '2px',
                                                fontSize: '10px',
                                                color: 'black',
                                                border: 'none',
                                                whiteSpace: 'nowrap'
                                            }}>
                                            {isCopyshow ? '복사 성공!' : '복사'}
                                        </Button>
                                    </p>
                                </CopyToClipboard>
                            </Col>
                        </Modal.Body>

                    </Modal>
                </Row>
                <Row className='my-1 d-flex justify-content-center flex-direction-column' style={{ color: 'rgb(109, 110, 109)', flexDirection: 'column' }}>
                    <Col>
                        <a href='https://www.notion.so/EUE-047f1812c6c24096a528dfd3330c227d' style={{ color: 'rgb(110, 189, 142)' }}>TEAM EUE </a> : 안강민, 박상호, 박예
                    </Col>
                    <Col>
                        © 2021 TEAM EUE. All rights reserved
                    </Col>
                </Row>
Spark's avatar
layout    
Spark committed
116

117
118
            </Card>
        </Row>
Spark's avatar
layout    
Spark committed
119
120
121
122
    )
}

export default Footer;