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";

class Keberatan extends Component {
	constructor(props) {
		super(props);
	}

	static getInitialProps = async () => {
		const sanksi = await getSanksi({ ptId: "0BCE4DB7-B207-445D-8D03-0C54B7688252" });
		return { sanksi };
	};

	render() {
		const { sanksi } = this.props;
		return (
			<ContentWrapper>
				<div className="content-heading">Permohonan Keberatan</div>
				<Row>
					<Col lg={12}>{sanksi.data.length > 0 ? <TableSanksi listData={sanksi.data} to="/app/pt/keberatan/detail" linkName="Detail" /> : ""}</Col>
				</Row>
			</ContentWrapper>
		);
	}
}

export default Keberatan;
