summaryrefslogtreecommitdiffstats
path: root/openecomp-ui/src/sdc-app/flows/ImportantLogic.jsx
diff options
context:
space:
mode:
authorEinav Weiss Keidar <einavw@amdocs.com>2018-03-20 14:45:40 +0200
committerAvi Gaffa <avi.gaffa@amdocs.com>2018-03-20 13:52:31 +0000
commit7fdf733a64670fceefc3ded35cfa581e1c458179 (patch)
treeb3623ac9a331473830cb0167c0b487f2a176427c /openecomp-ui/src/sdc-app/flows/ImportantLogic.jsx
parentc7916a4e5955ccc5f0f5252307363b791ec5c7b9 (diff)
Adding Prettier and fixing up eslint version
Issue-ID: SDC-1094 Change-Id: Ie83ad95a03899345dd90235daf0323cbe3bc6afd Signed-off-by: Einav Weiss Keidar <einavw@amdocs.com>
Diffstat (limited to 'openecomp-ui/src/sdc-app/flows/ImportantLogic.jsx')
-rw-r--r--openecomp-ui/src/sdc-app/flows/ImportantLogic.jsx58
1 files changed, 33 insertions, 25 deletions
diff --git a/openecomp-ui/src/sdc-app/flows/ImportantLogic.jsx b/openecomp-ui/src/sdc-app/flows/ImportantLogic.jsx
index d0a5bf3251..8a634915ac 100644
--- a/openecomp-ui/src/sdc-app/flows/ImportantLogic.jsx
+++ b/openecomp-ui/src/sdc-app/flows/ImportantLogic.jsx
@@ -13,27 +13,31 @@
* or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
-import React, {Component} from 'react';
+import React, { Component } from 'react';
import md5 from 'md5';
class ImportantLogic extends Component {
+ state = {
+ whatToDisplay: false
+ };
- state = {
- whatToDisplay: false
- };
+ componentWillReceiveProps(nextProps) {
+ this.setState({
+ whatToDisplay:
+ md5(nextProps.display) === 'a55899b341525123628776dbf5755d51'
+ });
+ }
- componentWillReceiveProps(nextProps) {
- this.setState({whatToDisplay: md5(nextProps.display) === 'a55899b341525123628776dbf5755d51'});
- }
+ render() {
+ if (this.state.whatToDisplay) {
+ setTimeout(() => this.setState({ whatToDisplay: false }), 5000);
+ }
- render() {
- if (this.state.whatToDisplay) {
- setTimeout(() => this.setState({whatToDisplay: false}), 5000);
- }
-
- return (
- <div>
- <style>{'\.easter-wrapper {\
+ return (
+ <div>
+ <style>
+ {
+ '.easter-wrapper {\
position: fixed;\
width: 70px;\
height: 70px;\
@@ -96,16 +100,20 @@ class ImportantLogic extends Component {
@keyframes yo-yo {\
from { transform: rotate(-0deg); top: 0 }\
to { transform: rotate(-360deg); top:120px }\
- }'}</style>
- <div
- className='easter-wrapper'
- style={{display: this.state.whatToDisplay ? 'block' : 'none'}}>
- <span className='string'>{}</span>
- <span className='yo-yo'>{}</span>
- </div>
- </div>
- );
- }
+ }'
+ }
+ </style>
+ <div
+ className="easter-wrapper"
+ style={{
+ display: this.state.whatToDisplay ? 'block' : 'none'
+ }}>
+ <span className="string">{}</span>
+ <span className="yo-yo">{}</span>
+ </div>
+ </div>
+ );
+ }
}
export default ImportantLogic;