File size: 1,353 Bytes
0dd6a66
0d37b12
fdbdf19
 
0d37b12
 
 
0dd6a66
 
fdbdf19
 
 
 
 
 
 
 
 
0dd6a66
 
 
fdbdf19
0d37b12
0dd6a66
 
 
 
 
 
0d37b12
 
 
0dd6a66
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import { Container, Row, Col } from "react-bootstrap";
import AdminTemplate from "../../templates/AdminTemplate";
import { useNavigate } from "react-router-dom";
import { useEffect } from "react";
import DataStorage from "../../organisms/DataStorage";

import SummaryReport from "../../organisms/SummaryReport";

export default function AdminSummaryPage() {

    const navigate = useNavigate();

    useEffect(() => {
        if (!DataStorage.get('isLoggedInAdmin')) {
            navigate('/admin-login');
        }
    }, [navigate]);

    return (
        <AdminTemplate content={
            (
                <Container className='d-flex text-center align-items-center justify-content-center' style={{ minHeight: '80vh' }}>
                    <Row className="align-items-center">
                        <Col xs={12}>
                            <h1>This is a demo summary page</h1>
                        </Col>
                        <Col xs={12}>
                            <h3>In the future, we hope to connect to PowerBI API and show the dashboard</h3>
                        </Col>
                        <Col xs={12} className='d-flex flex-column align-items-center'>
                            <SummaryReport/>
                        </Col>
                    </Row>
                </Container>
            )
        } />
    );
}