Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit 12362c2

Browse files
author
dengjun
committed
ci:hide show more conditionally
1 parent 844aeb1 commit 12362c2

File tree

1 file changed

+19
-14
lines changed
  • src/containers/MyGigs/JobListing/JobCard

1 file changed

+19
-14
lines changed

src/containers/MyGigs/JobListing/JobCard/index.jsx

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -127,20 +127,25 @@ const JobCard = ({ job }) => {
127127
</NoteTooltip>
128128
)}
129129
<span styleName="note">{job.remark}</span>
130-
<span styleName={`${expanded ? "show-less" : "show-more"}`}>
131-
<Button
132-
isText
133-
showRightArrow
134-
onClick={() => {
135-
setExpanded(!expanded);
136-
}}
137-
>
138-
{expanded ? "SHOW LESS" : "SHOW MORE"}
139-
<span styleName="arrow-down">
140-
<IconChevronDown />
141-
</span>
142-
</Button>
143-
</span>
130+
{![
131+
MY_GIGS_JOB_STATUS.JOB_CLOSED,
132+
MY_GIGS_JOB_STATUS.REJECTED_OTHER,
133+
].includes(job.status) && (
134+
<span styleName={`${expanded ? "show-less" : "show-more"}`}>
135+
<Button
136+
isText
137+
showRightArrow
138+
onClick={() => {
139+
setExpanded(!expanded);
140+
}}
141+
>
142+
{expanded ? "SHOW LESS" : "SHOW MORE"}
143+
<span styleName="arrow-down">
144+
<IconChevronDown />
145+
</span>
146+
</Button>
147+
</span>
148+
)}
144149
</div>
145150
{![
146151
MY_GIGS_JOB_STATUS.JOB_CLOSED,

0 commit comments

Comments
 (0)