From 77ab6f24096a8262e852be06cbea423e8da84911 Mon Sep 17 00:00:00 2001 From: Megha-Dev-19 <100185149+Megha-Dev-19@users.noreply.github.com> Date: Fri, 22 Nov 2024 22:18:42 +0530 Subject: [PATCH] updated terms and condition --- .../devhub/entity/proposal/CommentsAndLogs.jsx | 11 +++++++---- .../widget/components/rfps/CommentsAndLogs.jsx | 10 ++++++---- .../widget/components/rfps/Rfp.jsx | 2 +- .../widget/components/proposals/AcceptedTerms.jsx | 15 +++++++++++++++ .../widget/components/proposals/Proposal.jsx | 8 ++++++++ .../components/proposals/TermsAndConditions.jsx | 6 +++--- 6 files changed, 40 insertions(+), 12 deletions(-) create mode 100644 instances/treasury-templar.near/widget/components/proposals/AcceptedTerms.jsx diff --git a/instances/devhub.near/widget/devhub/entity/proposal/CommentsAndLogs.jsx b/instances/devhub.near/widget/devhub/entity/proposal/CommentsAndLogs.jsx index 8da752e75..63ca155be 100644 --- a/instances/devhub.near/widget/devhub/entity/proposal/CommentsAndLogs.jsx +++ b/instances/devhub.near/widget/devhub/entity/proposal/CommentsAndLogs.jsx @@ -4,6 +4,12 @@ const { getLinkUsingCurrentGateway } = VM.require( const snapshotHistory = props.snapshotHistory; const proposalId = props.id; const instanceAccount = props.item.path.split("/")[0]; +const acceptedTermsComponent = props.acceptedTermsComponent ?? ( + +); const Wrapper = styled.div` position: relative; @@ -329,10 +335,7 @@ const parseProposalKeyAndValue = (key, modifiedValue, originalValue) => { return ( accepted - + {acceptedTermsComponent} ); } diff --git a/instances/infrastructure-committee.near/widget/components/rfps/CommentsAndLogs.jsx b/instances/infrastructure-committee.near/widget/components/rfps/CommentsAndLogs.jsx index 4f5e13655..71d575355 100644 --- a/instances/infrastructure-committee.near/widget/components/rfps/CommentsAndLogs.jsx +++ b/instances/infrastructure-committee.near/widget/components/rfps/CommentsAndLogs.jsx @@ -92,7 +92,7 @@ State.init({ function sortTimelineAndComments() { const comments = Social.index("comment", props.item, { subscribe: true }); - if (state.changedKeysListWithValues === null) { + if (state.changedKeysListWithValues === null && snapshotHistory.length > 0) { const changedKeysListWithValues = snapshotHistory .slice(1) .map((item, index) => { @@ -135,9 +135,11 @@ function sortTimelineAndComments() { }); } -if (Array.isArray(snapshotHistory)) { - sortTimelineAndComments(); -} +useEffect(() => { + if (Array.isArray(snapshotHistory)) { + sortTimelineAndComments(); + } +}, [snapshotHistory]); const Comment = ({ commentItem }) => { const { accountId, blockHeight } = commentItem; diff --git a/instances/infrastructure-committee.near/widget/components/rfps/Rfp.jsx b/instances/infrastructure-committee.near/widget/components/rfps/Rfp.jsx index 2ef92c2da..ab4d476fc 100644 --- a/instances/infrastructure-committee.near/widget/components/rfps/Rfp.jsx +++ b/instances/infrastructure-committee.near/widget/components/rfps/Rfp.jsx @@ -279,7 +279,7 @@ const rfp = Near.view("${REPL_INFRASTRUCTURE_COMMITTEE_CONTRACT}", "get_rfp", { rfp_id: parseInt(id), }); -const queryName = "${REPL_PROPOSAL_FEED_INDEXER_QUERY_NAME}"; +const queryName = "${REPL_RFP_INDEXER_QUERY_NAME}"; const query = `query GetLatestSnapshot($offset: Int = 0, $limit: Int = 10, $where: ${queryName}_bool_exp = {}) { ${queryName}( offset: $offset diff --git a/instances/treasury-templar.near/widget/components/proposals/AcceptedTerms.jsx b/instances/treasury-templar.near/widget/components/proposals/AcceptedTerms.jsx new file mode 100644 index 000000000..cb6855ee6 --- /dev/null +++ b/instances/treasury-templar.near/widget/components/proposals/AcceptedTerms.jsx @@ -0,0 +1,15 @@ +const { href } = VM.require(`${REPL_DEVHUB}/widget/core.lib.url`); +href || (href = () => {}); + +return ( + + Templar's Terms and Conditions + +); diff --git a/instances/treasury-templar.near/widget/components/proposals/Proposal.jsx b/instances/treasury-templar.near/widget/components/proposals/Proposal.jsx index 24dd1be3b..109180b9d 100644 --- a/instances/treasury-templar.near/widget/components/proposals/Proposal.jsx +++ b/instances/treasury-templar.near/widget/components/proposals/Proposal.jsx @@ -865,6 +865,14 @@ return ( item: item, snapshotHistory: snapshotHistory, latestSnapshot: snapshot, + acceptedTermsComponent: ( + + ), }} /> diff --git a/instances/treasury-templar.near/widget/components/proposals/TermsAndConditions.jsx b/instances/treasury-templar.near/widget/components/proposals/TermsAndConditions.jsx index 974976135..8b3dc8019 100644 --- a/instances/treasury-templar.near/widget/components/proposals/TermsAndConditions.jsx +++ b/instances/treasury-templar.near/widget/components/proposals/TermsAndConditions.jsx @@ -908,8 +908,8 @@ return (

regularly update the relevant Supervisor in writing (e.g. by email or via - https://near.social/devhub.near/widget/app?page=home) on the - progress of completion of the Purpose; + https://near.social/treasury-templar.near/widget/portal?page=proposals) + on the progress of completion of the Purpose;

  • @@ -1574,7 +1574,7 @@ return (

    If you have any questions about these Terms please contact us via - legal@near.foundation. + info@templarprotocol.com.