Skip to content

Commit

Permalink
Merge pull request #762 from hats-finance/develop
Browse files Browse the repository at this point in the history
changes to prod
  • Loading branch information
fonstack authored Sep 16, 2024
2 parents b85b052 + b4ea83e commit 8848d3d
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 14 deletions.
2 changes: 1 addition & 1 deletion packages/web/src/languages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1034,7 +1034,7 @@
"shortBio": "Please provide a short bio",
"shortBioDesc": "Please provide a 2-3 sentences descriptor of your bio.",
"termsAndConditionsTitle": "Please read and agree to our curator terms and conditions",
"readTermsAndConditionsHere": "Read terms and conditions <a href='https://hats.finance/terms-and-conditions' target='_blank'>here</a>",
"readTermsAndConditionsHere": "Read terms and conditions <a href='https://docs.hats.finance/curator-program/curator-terms-and-conditions' target='_blank'>here</a>",
"youNeedToAcceptTermsAndConditions": "You need to accept the terms and conditions to continue",
"communicationChannel": "Communication channel",
"communicationChannelDesc": "Please provide a communication channel. Your communication channels won't be public on your profile.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
IVulnerabilitySeverityV1,
IVulnerabilitySeverityV2,
} from "@hats.finance/shared";
import { FormInput, FormSelectInput, Loading, Spinner } from "components";
import { FormInput, FormSelectInput, Spinner } from "components";
import { getCustomIsDirty, useEnhancedFormContext } from "hooks/form";
import { useOnChange } from "hooks/usePrevious";
import { hasSubmissionData } from "pages/CommitteeTools/PayoutsTool/utils/hasSubmissionData";
Expand Down Expand Up @@ -89,7 +89,7 @@ export const SinglePayoutForm = () => {
// Get information from github
useEffect(() => {
if (!beneficiarySubmission || !vault) return;
if (vaultGithubIssues !== undefined) return;
if (vaultGithubIssues !== undefined || isLoadingGH) return;

const loadGhIssues = async () => {
setIsLoadingGH(true);
Expand All @@ -98,7 +98,7 @@ export const SinglePayoutForm = () => {
setIsLoadingGH(false);
};
loadGhIssues();
}, [vault, vaultGithubIssues, beneficiarySubmission]);
}, [vault, vaultGithubIssues, beneficiarySubmission, isLoadingGH]);

return (
<StyledPayoutForm>
Expand Down Expand Up @@ -226,7 +226,6 @@ export const SinglePayoutForm = () => {
colorable
/>
</div> */}
{isLoadingGH && <Loading fixed extraText={`${t("loadingGithubIssues")}...`} />}
</StyledPayoutForm>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { GithubIssue, IPayoutResponse, ISplitPayoutData, IVault } from "@hats.fi
import DeleteIcon from "@mui/icons-material/DeleteOutlineOutlined";
import InfoIcon from "@mui/icons-material/InfoOutlined";
import MoreIcon from "@mui/icons-material/MoreVertOutlined";
import { DropdownSelector, FormInput, FormSelectInput, FormSelectInputOption, Loading, Modal, Spinner } from "components";
import { DropdownSelector, FormInput, FormSelectInput, FormSelectInputOption, Modal, Spinner } from "components";
import { getCustomIsDirty, useEnhancedFormContext } from "hooks/form";
import useModal from "hooks/useModal";
import { useOnChange } from "hooks/usePrevious";
Expand Down Expand Up @@ -104,7 +104,7 @@ export const SplitPayoutBeneficiaryForm = ({
// Get information from github
useEffect(() => {
if (!beneficiarySubmission || !vault) return;
if (vaultGithubIssues !== undefined) return;
if (vaultGithubIssues !== undefined || isLoadingGH) return;

const loadGhIssues = async () => {
setIsLoadingGH(true);
Expand All @@ -113,7 +113,7 @@ export const SplitPayoutBeneficiaryForm = ({
setIsLoadingGH(false);
};
loadGhIssues();
}, [vault, vaultGithubIssues, beneficiarySubmission]);
}, [vault, vaultGithubIssues, beneficiarySubmission, isLoadingGH]);

const getMoreOptions = () => {
if (beneficiariesCount === undefined) return [];
Expand Down Expand Up @@ -263,8 +263,6 @@ export const SplitPayoutBeneficiaryForm = ({
/>
</StyledSplitPayoutBeneficiaryAllocationModal>
</Modal>

{isLoadingGH && <Loading fixed extraText={`${t("loadingGithubIssues")}...`} />}
</div>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export const SubmissionDetailsPage = () => {

const vault = allVaults?.find((vault) => vault.id.toLowerCase() === submission.linkedVault?.id.toLowerCase());
if (!vault) return;
if (vaultGithubIssues !== undefined) return;
if (vaultGithubIssues !== undefined || isLoadingGH) return;

const loadGhIssues = async () => {
setIsLoadingGH(true);
Expand All @@ -50,7 +50,7 @@ export const SubmissionDetailsPage = () => {
setIsLoadingGH(false);
};
loadGhIssues();
}, [allVaults, vaultGithubIssues, submission]);
}, [allVaults, vaultGithubIssues, submission, isLoadingGH]);

const openSubmissionData = () => {
window.open(`${IPFS_PREFIX}/${submission?.submissionHash}`, "_blank");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ export const SubmissionsListPage = () => {

const vault = allVaults?.find((vault) => vault.id.toLowerCase() === vaultFilter.toLowerCase());
if (!vault) return;
if (vaultGithubIssues !== undefined) return;
if (vaultGithubIssues !== undefined || isLoadingGH) return;

const loadGhIssues = async () => {
setIsLoadingGH(true);
Expand All @@ -285,7 +285,7 @@ export const SubmissionsListPage = () => {
loadGhIssues();

console.log(filteredSubmissions);
}, [vaultFilter, filteredSubmissions, allVaults, vaultGithubIssues]);
}, [vaultFilter, filteredSubmissions, allVaults, vaultGithubIssues, isLoadingGH]);

// const handleDownloadAsCsv = () => {
// if (!filteredSubmissions) return;
Expand Down

0 comments on commit 8848d3d

Please sign in to comment.