Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
diablo1408 committed Dec 31, 2020
2 parents fd52f2f + e85d47a commit 32617fd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
3 changes: 0 additions & 3 deletions frontend/src/pages/Login/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,6 @@ class Login extends React.Component {
</div>

</div>



);
}
}
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/pages/Profile/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,9 @@ class Profile extends React.Component {
const { username, email, password, otp} = this.state.data;
const {errors} = this.state;
console.log("user",userData.user_image);
if(!localStorage.getItem('loggedIn')){
return <Redirect to="/login" />
}
if(localStorage.getItem('loggedIn') === 'false'){
return <Redirect to = {"/login"} />
}

let coverImage;

Expand Down
6 changes: 3 additions & 3 deletions frontend/src/pages/Register/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class RegisterForm extends React.Component {
console.log(user);
if(loggedIn){
localStorage.setItem('loggedIn', true);
if(!loggedIn){
if(localStorage.getItem('loggedIn') === 'true'){
localStorage.setItem('name',user.userData._id);
}
}
Expand Down Expand Up @@ -187,7 +187,7 @@ class RegisterForm extends React.Component {
<label for="orangeForm-pass">Your password</label>
</div>

<div className="md-form">
{/* <div className="md-form">
<i className="fas fa-lock prefix"></i>
<input
name="password"
Expand All @@ -200,7 +200,7 @@ class RegisterForm extends React.Component {
value = {password}
/>
<label for="orangeForm-pass">Repeat password</label>
</div>
</div> */}

{
this.state.isVerify ?
Expand Down

0 comments on commit 32617fd

Please sign in to comment.