PublicPage.js 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. import React, { Component } from "react";
  2. import BasePage from "@/components/Layout/BasePage";
  3. import { getPT } from "@/actions/PT";
  4. import { getPelanggaran } from "@/actions/pelanggaran";
  5. import Select from "react-select";
  6. import AsyncSelect from "react-select/async";
  7. import { Row, Col, FormGroup, Input, Card, CardBody, Button, CustomInput, Navbar, NavItem, NavLink, NavbarBrand, NavbarToggler, Nav, Collapse } from "reactstrap";
  8. import ContentWrapper from "@/components/Layout/ContentWrapper";
  9. const menu = [
  10. {
  11. title: "Home",
  12. path: "/app",
  13. },
  14. {
  15. title: "Membuat Laporan",
  16. path: "/laporan/new",
  17. },
  18. {
  19. title: "Pemantauan",
  20. path: "/pemantauan",
  21. },
  22. {
  23. title: "Login",
  24. path: "/login",
  25. },
  26. ];
  27. class PublicPage extends Component {
  28. constructor(props) {
  29. super(props);
  30. this.state = {
  31. isOpen: false,
  32. inputValue: "",
  33. stat: "Waiting to add files..",
  34. pelaporanNumber: Math.floor(Date.now() * Math.random()),
  35. nama: "",
  36. alamat: "",
  37. no_hp: "",
  38. email: "",
  39. fileIdentitas: null,
  40. pelanggaran: [],
  41. selectedPerguruanTinggi: {},
  42. selectedJenis: [],
  43. keteranganLaporan: "",
  44. files: [],
  45. };
  46. }
  47. render() {
  48. return (
  49. <div>
  50. <Navbar color="info" expand="md" dark>
  51. <NavbarBrand href="/">
  52. <img className="img-fluid" src="/static/img/logo-single.png" alt="App Logo" /> Aldila Dikti
  53. </NavbarBrand>
  54. <NavbarToggler onClick={this.toggleCollapse} />
  55. <Collapse isOpen={this.state.isOpen} navbar>
  56. <Nav className="ml-auto" navbar>
  57. {menu.map((e) => (
  58. <NavItem active={e.path === this.props.pathname ? true : false}>
  59. <NavLink href={e.path}>{e.title}</NavLink>
  60. </NavItem>
  61. ))}
  62. </Nav>
  63. </Collapse>
  64. </Navbar>
  65. <ContentWrapper>
  66. <Row>
  67. <Col lg={8} className="block-center d-block ">
  68. {this.props.children}
  69. </Col>
  70. </Row>
  71. </ContentWrapper>
  72. </div>
  73. );
  74. }
  75. }
  76. PublicPage.Layout = BasePage;
  77. export default PublicPage;