Skip to content

Commit

Permalink
remove outdated code
Browse files Browse the repository at this point in the history
  • Loading branch information
ajaitasaini committed Dec 3, 2024
1 parent 2ca05b2 commit 495b5fb
Showing 1 changed file with 6 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { useState } from "react";
import { useStore } from "utils";
import { useNavigate } from "react-router-dom";
import { createReport } from "utils/api/requestMethods/report";
import { ReportOptions } from "types";

export const CreateReportOptions = () => {
const [rulesOne, setRulesOne] = useState("0");
Expand All @@ -13,18 +14,13 @@ export const CreateReportOptions = () => {

const createForm = async () => {
if (!state) throw new Error("Cannot create report without state on user");
const stateOptions = [];

// Jank but proof of concept
if (rulesOne == "1") {
stateOptions.push("rulesOne");
}
if (rulesTwo == "1") {
stateOptions.push("rulesTwo");
}
// proof of concept
const reportOptions = {
name: "report1",
} as ReportOptions;

const formOptions = { stateOptions };
const report = await createReport("QM", state, formOptions);
const report = await createReport("QM", state, reportOptions);
navigate(`${state}/${report.id}`);
};

Expand Down

0 comments on commit 495b5fb

Please sign in to comment.