Skip to content

Commit

Permalink
description section and submitted section updates (#119)
Browse files Browse the repository at this point in the history
* added condition in proposal card and dialog to show submitted on section only if created time is exist

* added condition to show read more, less only if abstract or details exist

Signed-off-by: = <=>

* description section updated

Signed-off-by: = <=>

---------

Signed-off-by: = <=>
  • Loading branch information
VasaviMahajan authored Jan 21, 2025
1 parent c40bfd5 commit c47f4fa
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 24 deletions.
13 changes: 8 additions & 5 deletions src/containers/Proposals/Cards.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,22 +119,25 @@ const Cards = (props) => {
</Button>
: null}
</div>
<p className="description">{content?.abstract}</p>
<p className="description">{(content?.abstract) || (content?.details)}</p>
<div className="row">
<div className="icon_info">
<Icon className="person" icon="person"/>
<span className="key_text">Proposer &nbsp;/&nbsp;
{inProgress
? <DotsLoading/>
: proposal && proposal.author && <div className="hash_text" title={proposal.author}>
: proposal && proposal.author &&
<div className="hash_text" title={proposal.author}>
<p className="name">{proposal.author}</p>
{proposal.author &&
proposal.author.slice(proposal.author.length - 6, proposal.author.length)}
proposal.author.slice(proposal.author.length - 6, proposal.author.length)}
</div>}
</span>
</div>
<p className="key_text">Submitted on &nbsp;/&nbsp; {content && content.created
? moment(fixDateString(content.created)).format('DD-MMM-YYYY HH:mm:ss') : ''}</p>
{content && content.created
? <p className="key_text">Submitted
on &nbsp;/&nbsp; {moment(fixDateString(content.created)).format('DD-MMM-YYYY HH:mm:ss')}</p>
: null}
</div>
<div className="row">
<div className="icon_info">
Expand Down
41 changes: 22 additions & 19 deletions src/containers/Proposals/ProposalDialog/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,21 +154,23 @@ class ProposalDialog extends Component {
this.props.proposal.status === 'PROPOSAL_STATUS_FAILED' ? 'Failed' : ''
: ''}</div>
</div>
<div className="proposal_dialog_section2">
<pre
className={ClassNames('proposal_dialog_section2_content', this.state.show ? 'show_more' : '')}>
{content?.abstract}
<br/>
{content?.details}
</pre>
<div
className="proposal_dialog_section2_more"
onClick={this.handleChange}>
{this.state.show
? 'Read Less...'
: 'Read More...'}
{(content?.abstract) || (content?.details)
? <div className="proposal_dialog_section2">
<pre
className={ClassNames('proposal_dialog_section2_content', this.state.show ? 'show_more' : '')}>
{content?.abstract}
<br/>
{content?.details}
</pre>
<div
className="proposal_dialog_section2_more"
onClick={this.handleChange}>
{this.state.show
? 'Read Less...'
: 'Read More...'}
</div>
</div>
</div>
: null}
<div className="proposal_dialog_section3">
<div className="proposal_dialog_section3_left">
<div className="pds3l_c">
Expand All @@ -179,11 +181,12 @@ class ProposalDialog extends Component {
this.props.proposal.author.slice(this.props.proposal.author.length - 6, this.props.proposal.author.length)}
</div>}
</div>
<div className="pds3l_c">
<p className="pds3l_c1">Submitted on</p>
<p className="pds3l_c2">{content && content.created
? moment(fixDateString(content.created)).format('DD-MMM-YYYY HH:mm:ss') : ''}</p>
</div>
{content && content.created
? <div className="pds3l_c">
<p className="pds3l_c1">Submitted on</p>
<p className="pds3l_c2">{moment(fixDateString(content.created)).format('DD-MMM-YYYY HH:mm:ss')}</p>
</div>
: null}
<div className="pds3l_c">
<p className="pds3l_c1">Voting Period</p>
<div className="pds3l_c2 vp_cards">
Expand Down

0 comments on commit c47f4fa

Please sign in to comment.