Update text of button when unhiding a story
This commit is contained in:
parent
ea65b1390b
commit
b1a0b9a7a8
4 changed files with 26 additions and 15 deletions
|
@ -117,21 +117,24 @@ export function StoryListItem({
|
|||
repliesElement = <div className="StoryListItem__info--replies--others" />;
|
||||
}
|
||||
|
||||
const menuOptions = [
|
||||
{
|
||||
icon: 'StoryListItem__icon--hide',
|
||||
label: isHidden
|
||||
? i18n('icu:StoryListItem__unhide')
|
||||
: i18n('icu:StoryListItem__hide'),
|
||||
const menuOptions = [];
|
||||
if (isHidden) {
|
||||
menuOptions.push({
|
||||
icon: 'StoryListItem__icon--unhide',
|
||||
label: i18n('icu:StoryListItem__unhide'),
|
||||
onClick: () => {
|
||||
if (isHidden) {
|
||||
onHideStory(conversationId);
|
||||
} else {
|
||||
setHasConfirmHideStory(true);
|
||||
}
|
||||
onHideStory(conversationId);
|
||||
},
|
||||
},
|
||||
];
|
||||
});
|
||||
} else {
|
||||
menuOptions.push({
|
||||
icon: 'StoryListItem__icon--hide',
|
||||
label: i18n('icu:StoryListItem__hide'),
|
||||
onClick: () => {
|
||||
setHasConfirmHideStory(true);
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
if (!isSignalOfficial) {
|
||||
menuOptions.push({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue