mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2025-02-17 00:21:20 -05:00
Show deleted banner if both deleted and censored.
This is because the user can take an action to remove the trash status, but not the censored status.
This commit is contained in:
parent
0b8c13fb40
commit
2ed74a2682
1 changed files with 6 additions and 6 deletions
|
@ -108,7 +108,12 @@ const PreviewPresentation = ({
|
|||
);
|
||||
|
||||
let banner;
|
||||
if (visibilityInfo.censored) {
|
||||
if (visibilityInfo.deleted) { // If both censored and deleted, prioritize deleted banner
|
||||
banner = (<Banner
|
||||
className="banner-danger"
|
||||
message={<FormattedMessage id="project.deletedBanner" />}
|
||||
/>);
|
||||
} else if (visibilityInfo.censored) {
|
||||
if (visibilityInfo.reshareable) {
|
||||
banner = (<Banner
|
||||
actionMessage={<FormattedMessage id="project.share.shareButton" />}
|
||||
|
@ -122,11 +127,6 @@ const PreviewPresentation = ({
|
|||
message={embedCensorMessage(visibilityInfo.censorMessage)}
|
||||
/>);
|
||||
}
|
||||
} else if (visibilityInfo.deleted) {
|
||||
banner = (<Banner
|
||||
className="banner-danger"
|
||||
message={<FormattedMessage id="project.deletedBanner" />}
|
||||
/>);
|
||||
} else if (canShare && !isShared) {
|
||||
banner = (<Banner
|
||||
actionMessage={<FormattedMessage id="project.share.shareButton" />}
|
||||
|
|
Loading…
Reference in a new issue