Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

changes to prod #762

Merged
merged 3 commits into from
Sep 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading