mirror of
https://github.com/ritz078/transform.git
synced 2026-11-22 09:01:31 +03:00
hide success banners after 2 seconds
This commit is contained in:
1 parent
c0f8c53d48
commit
dd6f1e181a
1 file changed
+9
@@ -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>{`
|
||||
|
||||
Reference in new issue
Block a user