Skip to content

Commit

Permalink
added not about proposal expiration
Browse files Browse the repository at this point in the history
  • Loading branch information
Megha-Dev-19 committed Mar 28, 2024
1 parent 496b3a1 commit ce0e2d5
Showing 1 changed file with 49 additions and 39 deletions.
88 changes: 49 additions & 39 deletions apps/astraplusplus/widget/DAO/Proposals/Card/ui.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -985,45 +985,55 @@ const NotificationModal = () => {
src="/*__@appAccount__*//widget/Layout.Modal"
props={{
content: (
<div className="ndc-card d-flex flex-column gap-3 p-4">
Do you want to notify proposer: {proposer} about the vote?
<div className="d-flex gap-3 justify-content-end">
<Widget
src="nearui.near/widget/Input.Button"
props={{
children: <>No</>,
size: "sm",
variant: "danger outline",
onClick: () => {
handleVote({
action: voteDetails,
daoId,
proposalId: proposal.id,
proposer,
showNotification: false
});
setNotificationModal(false);
}
}}
/>
<Widget
src="nearui.near/widget/Input.Button"
props={{
children: <>Yes</>,
variant: "info outline",
size: "sm",
onClick: () => {
handleVote({
action: voteDetails,
daoId,
proposalId: proposal.id,
proposer,
showNotification: true
});
setNotificationModal(false);
}
}}
/>
<div className="ndc-card p-4">
{/* proposal is expired */}
{new Date().getTime() > new Date(expirationTime).getTime() && (
<div className="alert alert-info">
Please note: This proposal has expired. Your vote will only mark
the proposal as 'Expired' and won't affect the decision-making
process.
</div>
)}
<div className="d-flex flex-column gap-3">
Do you want to notify proposer: {proposer} about the vote?
<div className="d-flex gap-3 justify-content-end">
<Widget
src="nearui.near/widget/Input.Button"
props={{
children: <>No</>,
size: "sm",
variant: "danger outline",
onClick: () => {
handleVote({
action: voteDetails,
daoId,
proposalId: proposal.id,
proposer,
showNotification: false
});
setNotificationModal(false);
}
}}
/>
<Widget
src="nearui.near/widget/Input.Button"
props={{
children: <>Yes</>,
variant: "info outline",
size: "sm",
onClick: () => {
handleVote({
action: voteDetails,
daoId,
proposalId: proposal.id,
proposer,
showNotification: true
});
setNotificationModal(false);
}
}}
/>
</div>
</div>
</div>
),
Expand Down

0 comments on commit ce0e2d5

Please sign in to comment.