Skip to content

Commit

Permalink
remove some un-used code
Browse files Browse the repository at this point in the history
  • Loading branch information
13bfrancis committed Mar 26, 2024
1 parent 12ca146 commit acd108c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ export const ToggleRaiResponseWithdraw = ({ isEnabled }: Props) => {
: "Once you submit this form, you will disable the previous Formal RAI Response Withdraw - Enabled action. The State will not be able to withdraw the Formal RAI Response. ";

if (!formMethods.getValues("raiWithdrawEnabled")) {
console.log("testing", isEnabled);
formMethods.setValue("raiWithdrawEnabled", isEnabled);
}

Expand Down
4 changes: 1 addition & 3 deletions src/services/ui/src/hooks/useSyncStatus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { getItem } from "@/api";
import { Route } from "@/components/Routing";
import { useNavigate } from "react-router-dom";
import { useQuery } from "@tanstack/react-query";
import { createRef, useRef, useState } from "react";
import { useRef, useState } from "react";
import { type SEATOOL_STATUS } from "shared-types";
import { queryClient } from "@/router";
import { ItemResult } from "shared-types/opensearch/main";
Expand Down Expand Up @@ -37,14 +37,12 @@ export const useSyncStatus = ({
return false;
}

// return to dashboard when the status has successfuly updated
if (data && isCorrectStatus(data)) {
queryClient.invalidateQueries(["actions", id]);
navigate(path);
return false;
}

// otherwise try again in one second
return 1000; //aka 1 second
},
enabled: runQuery,
Expand Down

0 comments on commit acd108c

Please sign in to comment.