import React, {Component} from 'react'; import { History, LocationState } from 'history'; import classes from './index.css'; type Props = { getPageName: (name: string) => void; history: History; } class ShowReportsType extends Component { componentDidMount() { this.props.getPageName("reports") } onReport (name: string, targetName: string) { const target = document.getElementById(targetName); const all = document.getElementById("allReports"); setTimeout(() => { // @ts-ignore target.style.transform = "translateX(-30px)"; setTimeout(() => { // @ts-ignore target.style.transform = "translateX(2000px)"; // @ts-ignore all.style.opacity = "0"; }, 300) }, 100); setTimeout(() => { this.props.history.push(`/logged/reports/${name}`) }, 1000) } render() { return (
this.onReport("buying", "targetingFirst")} >
buying reports
this.onReport("selling", "targetingSecond")} >
selling reports
this.onReport("notpaid", "targetingThird")} >
unpaid bills
); } } export default ShowReportsType;