import React, { Component } from "react";
import ContentWrapper from "@/components/Layout/ContentWrapper";
import { Row, Col } from "reactstrap";
import CaseProgress from "@/components/Main/CaseProgress";
import TableSanksi from "@/components/Main/TableSanksi";
import { getSanksi } from "@/actions/sanksi";

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

	static getInitialProps = async () => {
		const sanksi = await getSanksi({keberatan: true});
		return { sanksi };
	};

	render() {
		const { sanksi } = this.props;
		return (
			<ContentWrapper>
				<div className="content-heading">Keberatan</div>
				<Row>
					<Col lg="4">
						<CaseProgress />
					</Col>
					<Col lg="8">
						<TableSanksi listData={sanksi.data} to="/app/keberatan/detail" linkName="Detail" />
					</Col>
				</Row>
			</ContentWrapper>
		);
	}
}

export default Keberatan;
