diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2020-01-26 20:07:26 +0100 |
---|---|---|
committer | Thibaut Girka <thib@sitedethib.com> | 2020-01-27 16:01:06 +0100 |
commit | e36d0a98cc10575e67c526ef3cc9eeb431a1af3f (patch) | |
tree | 9e2922400bc4752a488efd97597743472f03f23c /app/javascript/flavours/glitch/features/getting_started | |
parent | 8a8936725ef34d16180203ce852d85c0748a8c3b (diff) |
[Glitch] Add streaming API updates for announcements being modified or deleted
Port b9d74d407673a6dbdc87c3310618b22c85358c85 to glitch-soc Signed-off-by: Thibaut Girka <thib@sitedethib.com>
Diffstat (limited to 'app/javascript/flavours/glitch/features/getting_started')
-rw-r--r-- | app/javascript/flavours/glitch/features/getting_started/components/announcements.js | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/app/javascript/flavours/glitch/features/getting_started/components/announcements.js b/app/javascript/flavours/glitch/features/getting_started/components/announcements.js index 9a7d175c4..489f53f0f 100644 --- a/app/javascript/flavours/glitch/features/getting_started/components/announcements.js +++ b/app/javascript/flavours/glitch/features/getting_started/components/announcements.js @@ -367,11 +367,13 @@ class Announcements extends ImmutablePureComponent { ))} </ReactSwipeableViews> - <div className='announcements__pagination'> - <IconButton disabled={announcements.size === 1} title={intl.formatMessage(messages.previous)} icon='chevron-left' onClick={this.handlePrevClick} size={13} /> - <span>{index + 1} / {announcements.size}</span> - <IconButton disabled={announcements.size === 1} title={intl.formatMessage(messages.next)} icon='chevron-right' onClick={this.handleNextClick} size={13} /> - </div> + {announcements.size > 1 && ( + <div className='announcements__pagination'> + <IconButton disabled={announcements.size === 1} title={intl.formatMessage(messages.previous)} icon='chevron-left' onClick={this.handlePrevClick} size={13} /> + <span>{index + 1} / {announcements.size}</span> + <IconButton disabled={announcements.size === 1} title={intl.formatMessage(messages.next)} icon='chevron-right' onClick={this.handleNextClick} size={13} /> + </div> + )} </div> </div> ); |