hide success banners after 2 seconds

This commit is contained in:
Gyandeep Singh committed 2017-09-06 23:03:01 -05:00
1 parent 2204774788
commit eca69b925d
1 file changed
+9
+9
View File
@@ -201,6 +201,15 @@ export default class ConversionPanel extends PureComponent {
scrollbarStyle: null
};
// hide success footer bannner after 2 seconds. Let other types be visible until fixed.
clearTimeout(this.footerTimeout);
if (infoType === "success") {
this.footerTimeout = setTimeout(() => this.setState({
info: "",
infoType: ""
}), 2000);
}
return (
<div className="wrapper">
<style jsx>{`