Skip to content

Commit

Permalink
fix announcement status
Browse files Browse the repository at this point in the history
  • Loading branch information
ety001 committed Apr 16, 2021
1 parent b4adcfc commit 12ef435
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
11 changes: 4 additions & 7 deletions src/app/components/pages/Announcement.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,12 @@ class Announcement extends Component {
</ul>
);

return (
return notices && notices.size > 0 && notices.toJS()[0].status === 1 ? (
<div className="c-sidebar__module">
<div className="c-sidebar__content">
{notices &&
notices.size > 0 &&
notices.toJS()[0].status === 1 &&
list}
</div>
<div className="c-sidebar__content">{list}</div>
</div>
) : (
<div />
);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/app/locales/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@
"use_only_lowercase_letters": "只使用小写字母",
"use_one_dash": "只使用一个破折号",
"use_spaces_to_separate_tags": "使用空格分隔标签",
"use_only_allowed_characters": "只使用小写字母、数字和一个破折号",
"use_only_allowed_characters": "请使用小写字母、数字或破折号",
"must_start_with_a_letter": "必须从一个字母开始",
"must_end_with_a_letter_or_number": "必须以字母或数字结尾"
},
Expand Down

0 comments on commit 12ef435

Please sign in to comment.