{"size": 1465, "ext": "js", "max_stars_repo_path": "pages/report.js", "max_stars_repo_name": "hasprLLP/coffee-dashboard", "max_stars_repo_stars_event_min_datetime": "2021-11-08T02:11:44.000Z", "max_stars_repo_stars_event_max_datetime": "2021-11-08T02:11:44.000Z", "max_issues_repo_path": "pages/report.js", "max_issues_repo_name": "hasprLLP/coffee-dashboard", "max_issues_repo_issues_event_min_datetime": "2022-02-20T10:59:02.000Z", "max_issues_repo_issues_event_max_datetime": "2022-02-27T11:21:19.000Z", "max_forks_repo_path": "pages/report.js", "max_forks_repo_name": "hasprLLP/coffee-dashboard", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": 5, "max_forks_count": null, "avg_line_length": 32.5555555556, "max_line_length": 89, "alphanum_fraction": 0.5453924915}
import TotalFee from "@/tables/feereport";
import InvoiceReport from "@/tables/invoicereport";
import IncomeReport from "@/tables/incomereport";
import RedeemReport from "@/tables/redeemreport";
import DropDown from "@/components/dropdown";
import { Radio, RadioGroup, Stack } from "@chakra-ui/react";
import axios from "axios";
import { useState } from "react";
axios.defaults.withCredentials = true;

export default function Report() {
  const [report, setReport] = useState("Fee");

  return (
    <div className="home">
      <div style={{ marginLeft: "5vw", width: "85%", height: "100%", marginTop: "5vw" }}>
        <RadioGroup onChange={setReport} value={report}>
          <Stack direction="row">
            <Radio value="Fee" colorScheme="teal" pr="6">
              Fees Report
            </Radio>
            <Radio value="Invoice" colorScheme="teal" pr="6">
              Invoice Report
            </Radio>
            <Radio value="Redeem" colorScheme="teal" pr="6">
              Redeem Report
            </Radio>
          </Stack>
        </RadioGroup>
        <div style={{ paddingBottom: "2vw", paddingTop: "2vw" }}>
          {report === "Fee" ? (
            <TotalFee />
          ) : report === "Invoice" ? (
            <InvoiceReport />
          ) : report === "Income" ? (
            <IncomeReport />
          ) : report === "Redeem" ? (
            <RedeemReport />
          ) : null}
        </div>
      </div>
    </div>
  );
}
