import React, { Component } from "react"; import ContentWrapper from "@/components/Layout/ContentWrapper"; import Header from "@/components/Main/Header"; import DetailPT from "@/components/Main/DetailPT"; import { getLog } from "@/actions/log"; import { Row, Col } from "reactstrap"; import Timeline from "@/components/Main/Timeline"; import { getPT } from "@/actions/PT"; class Pemantauan extends Component { constructor(props) { super(props); this.state = { pt: {}, }; } static async getInitialProps({ query }) { const log = await getLog({ ptId: query.ptId }); return { log, query }; } componentDidMount = async () => { const { query } = this.props; const pt = await getPT({ id: query.ptId }); this.setState({ pt }); }; render() { const { log } = this.props; const { pt } = this.state; console.log(pt); return (
{/* */}
); } } export default Pemantauan;