import React, { useRef, Component } from 'react'; import { useReactToPrint } from "react-to-print"; import { Row, Col, Button } from "reactstrap"; import Head from 'next/head' import SignatureCanvas from 'react-signature-canvas' import ComponentToPrint from "./SuratBA"; import ReactToPrint, { PrintContextConsumer } from 'react-to-print'; import { getOneLaporan, updateLaporan } from "@/actions/pelaporan"; class BeritaAcara extends Component { constructor(props) { super(props); this.state = { }; } static getInitialProps = async ({ query }) => { return { query }; }; render() { return (
this.componentRef}> {({ handlePrint }) => (
)}
{/*
*/} (this.componentRef = el)} query={this.props.query} dataPelanggaran={this.props.dataPelanggaran} /> {/*
*/}
); } } export default BeritaAcara