Skip to content

Commit

Permalink
updated terms and condition
Browse files Browse the repository at this point in the history
  • Loading branch information
Megha-Dev-19 committed Nov 22, 2024
1 parent 2d4ea17 commit 77ab6f2
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 ?? (
<Widget
src={"${REPL_DEVHUB}/widget/devhub.entity.proposal.AcceptedTerms"}
props={{ proposalId: proposalId }}
/>
);

const Wrapper = styled.div`
position: relative;
Expand Down Expand Up @@ -329,10 +335,7 @@ const parseProposalKeyAndValue = (key, modifiedValue, originalValue) => {
return (
<span>
accepted
<Widget
src={"${REPL_DEVHUB}/widget/devhub.entity.proposal.AcceptedTerms"}
props={{ proposalId: proposalId }}
/>
{acceptedTermsComponent}
</span>
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
const { href } = VM.require(`${REPL_DEVHUB}/widget/core.lib.url`);
href || (href = () => {});

return (
<a
href={href({
widgetSrc: `${REPL_TREASURY_TEMPLAR}/widget/components.proposals.TermsAndConditions`,
})}
className="text-decoration-underline"
target="_blank"
rel="noopener noreferrer"
>
Templar's Terms and Conditions
</a>
);
Original file line number Diff line number Diff line change
Expand Up @@ -865,6 +865,14 @@ return (
item: item,
snapshotHistory: snapshotHistory,
latestSnapshot: snapshot,
acceptedTermsComponent: (
<Widget
src={
"${REPL_TREASURY_TEMPLAR}/widget/components.proposals.AcceptedTerms"
}
props={{ proposalId: proposalId }}
/>
),
}}
/>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -908,8 +908,8 @@ return (
<p className="para-x">
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;
</p>
</li>
<li className="ordered-list-item">
Expand Down Expand Up @@ -1574,7 +1574,7 @@ return (
</h4>
<p className="para-x single-type">
If you have any questions about these Terms please contact us via
[email protected].
[email protected].
</p>
</div>
</div>
Expand Down

0 comments on commit 77ab6f2

Please sign in to comment.