| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133 | import React, { Component } from "react";import BasePage from "@/components/Layout/BasePage";import { Row, Col, Navbar, NavItem, NavLink, NavbarBrand, NavbarToggler, Nav, Collapse, Jumbotron, Button } from "reactstrap";import ContentWrapper from "@/components/Layout/ContentWrapper";import Link from "next/link";import Login from "@/components/Main/Login";import { connect } from "react-redux";import { createPengunjung } from "@/actions/pengunjung";import ChartdataHome from "../../components/Main/ChartdataHome";const menu = [  {    title: "Home",    path: "/app",  },  {    title: "Buat Laporan",    path: "/laporan/new",  },  {    title: "Pemantauan",    path: "/pemantauan",  },];class App extends Component {  constructor(props) {    super(props);    this.state = {      isOpen: false,    };  }  static getInitialProps = ({ pathname }) => ({ pathname });  async componentDidMount() {    const { token } = this.props;    if (!token) {      await createPengunjung();    }  }  toggleCollapse = () => {    this.setState({      isOpen: !this.state.isOpen,    });  };  render() {    return (      <div>        <Navbar className="navbar-color" expand="md" dark>          <NavbarBrand href="/">            <img className="width-133" src="/static/img/Logo-Sidali.png" alt="App Logo" />          </NavbarBrand>          <NavbarToggler onClick={this.toggleCollapse} />          <Collapse isOpen={this.state.isOpen} navbar>            <Nav className="ml-auto" navbar>              {menu.map((e) => (                <NavItem active={e.path === this.props.pathname ? true : false}>                  <Link href={e.path}>                    <NavLink style={{ cursor: "pointer" }}>{e.title}</NavLink>                  </Link>                </NavItem>              ))}            </Nav>          </Collapse>        </Navbar>        <ContentWrapper>          <Jumbotron>            <Row className="home-1">              <Col lg={8} className="d-flex flex-column justify-content-center align-items-start">                <h1 className="display-5 home-2 txt-size">Sistem Informasi Pengendalian Kelembagaan Perguruan Tinggi pada Pendidikan Tinggi Akademik</h1>                <p className="lead txt-size">Layanan Pelaporan Pelanggaran Perguruan Tinggi Penyelenggara Pendidikan Tinggi Akademik</p>                <hr className="my-4" />                <p className="txt-size">Disediakan kepada masyarakat untuk melaporkan pelanggaran perguruan tinggi yang menyelenggarakan pendidikan tinggi akademik</p>                <p className="lead">                  {/* <Link href="/laporan/new">										<button className="btn btn-info btn-lg"><img className="icon-buatlaporan" src="/static/img/icon-buat-laporan.png" alt="icon"/>Buat Laporan</button>									</Link> */}                  <Link href="/laporan/new">                    <span className="btn-radius">                      <Button color="" className="btn-labeled">                        <span className="btn-label">                          <img className="icon-buatlaporan" src="/static/img/icon-buat-laporan.png" alt="icon" />                        </span>                        <text className="text-button-home-1 font-color-white">Buat Laporan</text>                      </Button>                    </span>                  </Link>                  <Link href="/pemantauan">                    <span className="btn-radius">                      <Button color className="btn-labeled-2">                        <span className="btn-label">                          <img className="icon-pemantauan" src="/static/img/icon-pemantauan.png" alt="icon" />                        </span>                        <text className="text-button-home-1 font-color-white">Pemantauan</text>                      </Button>                    </span>                  </Link>                </p>                <div id="video-css">                  <video controls>                    <source src="/static/img/video/video_buat_laporan.mp4" type="video/mp4" />                  </video>                  <div className="d-flex flex-column">                    <div>                      <ChartdataHome />                    </div>                    <div>                      <img className="pl-5" src="/static/img/ditbaga-logo.png" alt="applogo" />                    </div>                  </div>                </div>              </Col>              <Col>                <Login />                {/* <ChartdataHome /> */}              </Col>            </Row>          </Jumbotron>          <span>Version 2.3 ~ 2.2</span>        </ContentWrapper>      </div>    );  }}App.Layout = BasePage;const MapStateToProps = (state) => ({ token: state.token });export default connect(MapStateToProps)(App);
 |