From 5dd84f9ca68b55e892d0f13f37b284457990a4de Mon Sep 17 00:00:00 2001 From: Sampath Kumar Krishnan Date: Sun, 12 Apr 2020 15:32:17 +0000 Subject: Make update banner dismissable (#564) - Remove the sticky option passed to InfoBar in AppUpdateInfoBar - Use component state to manage visibility of AppUpdateInfoBar in AuthLayout and AppLayout. - InfoBar will be dismissed only for the current session Co-Authored-By: Mahadevan Sreenivasan Co-authored-by: Mahadevan Sreenivasan --- src/components/AppUpdateInfoBar.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/components/AppUpdateInfoBar.js') diff --git a/src/components/AppUpdateInfoBar.js b/src/components/AppUpdateInfoBar.js index 4108fdf12..f51fe029b 100644 --- a/src/components/AppUpdateInfoBar.js +++ b/src/components/AppUpdateInfoBar.js @@ -24,6 +24,7 @@ class AppUpdateInfoBar extends Component { static propTypes = { onInstallUpdate: PropTypes.func.isRequired, nextAppReleaseVersion: PropTypes.string, + onHide: PropTypes.func.isRequired, }; static defaultProps = { @@ -39,6 +40,7 @@ class AppUpdateInfoBar extends Component { const { onInstallUpdate, nextAppReleaseVersion, + onHide, } = this.props; return ( @@ -46,7 +48,7 @@ class AppUpdateInfoBar extends Component { type="primary" ctaLabel={intl.formatMessage(messages.buttonInstallUpdate)} onClick={onInstallUpdate} - sticky + onHide={onHide} > {intl.formatMessage(messages.updateAvailable)} -- cgit v1.2.3-54-g00ecf