hide success banners after 2 seconds

This commit is contained in:
Gyandeep Singh committed 2017-09-05 23:32:01 -05:00
1 parent c0f8c53d48
commit dd6f1e181a
1 file changed
+9
+9
View File
@@ -194,6 +194,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>{`