Home.js 1.85 KB
Newer Older
Spark's avatar
Spark committed
1
2
import React from 'react'
import { Container, Row, Col } from 'react-bootstrap';
Spark's avatar
layout    
Spark committed
3
4
5
6
7
8
import MainLayer from '../components/MainLayer';
import TimeNow from './../components/TimeNow';
import '../App.css'
import EueSuggest from '../components/EueSuggest';
import ChartLine from '../components/ChartLine';
import ChartDoughnut from '../components/ChartDoughnut';
Spark's avatar
Spark committed
9
import Donation from '../components/Donation';
Spark's avatar
Spark committed
10
import axios from 'axios';
Spark's avatar
layout    
Spark committed
11
12


Spark's avatar
Spark committed
13
function Home() {
Spark's avatar
layout    
Spark committed
14
15
16
17
18
19
20
21
22
23
    const constyled = {
        display: 'flex',
        justifyContent: 'space-evenly',
        width: '100%',
        position: 'relative'
    }

    const col1sty = {
        display: 'flex',
        justifyContent: 'start',
Spark's avatar
Spark committed
24
        alignItems: 'center'
Spark's avatar
layout    
Spark committed
25
    }
Spark's avatar
Spark committed
26

Spark's avatar
layout    
Spark committed
27
28
29
30
31
32
33
34
    const col2sty = {
        display: 'flex',
        justifyContent: 'center',
        alignItems: 'center',
        flexDirection: 'column',
        padding: '0'
    }

Spark's avatar
Spark committed
35
36
    const getusername = axios.get(`/api/user`)
    console.log(getusername)
Spark's avatar
Spark committed
37
38


Spark's avatar
layout    
Spark committed
39
    return (
Spark's avatar
Spark committed
40
41
42
43
44
45
46
47
48
            <Container className='m-auto d-flex position-relative'
                style={{ flexDirection: 'column' }} fluid>
                <Row className='d-flex'>
                    <Row style={constyled} className='m-auto'>
                        <Col xs={12} md={6} className='d-flex justify-content-center' id='stickyy'>
                            <Row style={col1sty} className='m-auto'>
                                <MainLayer />
                            </Row>
                        </Col>
Spark's avatar
layout    
Spark committed
49

Spark's avatar
Spark committed
50
51
52
53
54
55
56
57
58
59
                        <Col md={6} style={col2sty}>
                            {/* <TimeNow /> */}
                            <EueSuggest />
                            <ChartLine />
                            <ChartDoughnut />
                            <Donation />
                        </Col>
                    </Row>
                </Row>
            </Container>
Spark's avatar
layout    
Spark committed
60
61
62
    );
}

Spark's avatar
Spark committed
63
export default Home;