| 12345678910111213141516171819202122232425262728293031323334353637 |
- import React, { Component } from "react";
- import ContentWrapper from "@/components/Layout/ContentWrapper";
- import { Row, Col } from "reactstrap";
- import { getSanksi } from "@/actions/sanksi";
- import TableSanksi from "@/components/PT/TableSanksi";
- import { connect } from "react-redux";
- import Loader from "@/components/Common/Loader";
- class PencabutanSanksi extends Component {
- constructor(props) {
- super(props);
- this.state = {
- sanksi: {},
- };
- }
- componentDidMount = async () => {
- const { token } = this.props;
- const sanksi = await getSanksi(token);
- this.setState({ sanksi });
- };
- render() {
- const { sanksi } = this.state;
- return (
- <ContentWrapper>
- <div className="content-heading">Permohonan Pencabutan Sanksi</div>
- <Row>
- <Col lg={12}>{sanksi.data?.length ? <TableSanksi listData={sanksi.data} to="/pt/pencabutan-sanksi/detail" linkName="Detail" /> : sanksi.data ? "Tidak ada Sanksi" : <Loader />}</Col>
- </Row>
- </ContentWrapper>
- );
- }
- }
- const mapStateToProps = (state) => ({ user: state.user, token: state.token });
- export default connect(mapStateToProps)(PencabutanSanksi);
|