diff --git a/src/components/pages/profile.jsx b/src/components/pages/profile.jsx index cad3a29..917cfc8 100644 --- a/src/components/pages/profile.jsx +++ b/src/components/pages/profile.jsx @@ -48,63 +48,17 @@ class Profile extends React.Component { //main panel let MainPanel; - if (this.state.username != '') { - MainPanel = () => { - return ( -
Username:
-{this.state.username}
- - -Gold:
-{this.state.gold}
- - -Recruits:
-{this.state.recruits}
- -Soldiers:
-{this.state.soldiers}
- - -Spies:
-{this.state.spies}
- - -Scientists:
-{this.state.scientists}
- - -No profile found!
-Username:
+{this.state.username}
+ + +Gold:
+{this.state.gold}
+ + +Recruits:
+{this.state.recruits}
+ +Soldiers:
+{this.state.soldiers}
+ + +Spies:
+{this.state.spies}
+ + +Scientists:
+{this.state.scientists}
+ + +Return home
-Go to { e.preventDefault(); this.requestProfileData(this.props.username); this.props.history.push('/profile'); }}>your profile
+Go to { e.preventDefault(); this.requestProfileData(this.props.username); this.setWarning(''); this.props.history.push('/profile'); }}>your profile
Username:
+{this.state.username}
+ + +Gold:
+{this.state.gold}
+ + +Recruits:
+{this.state.recruits}
+ + +Soldiers:
+{this.state.soldiers}
+ + +Spies:
+{this.state.spies}
+ + +Scientists:
+{this.state.scientists}
+ + +No profile found!
+