Last change
on this file since 5f9d25a was 6f9b7b0, checked in by i-ina <76742075+i-ina@…>, 4 years ago |
user login
|
-
Property mode
set to
100644
|
File size:
603 bytes
|
Line | |
---|
1 | import React from 'react';
|
---|
2 | import UserDetails from "./components/user_profile";
|
---|
3 | import { Redirect } from "react-router-dom";
|
---|
4 |
|
---|
5 | const Profile = (props) => {
|
---|
6 |
|
---|
7 | if(props.userProfile.type==="USER"){
|
---|
8 | return (
|
---|
9 | <UserDetails data={{
|
---|
10 | email: props.userProfile.email,
|
---|
11 | name: props.userProfile.name,
|
---|
12 | surname: props.userProfile.surname,
|
---|
13 | retained: props.userProfile.retained,
|
---|
14 | toLearn: props.userProfile.toLearn
|
---|
15 | }}/>
|
---|
16 | );
|
---|
17 | }
|
---|
18 |
|
---|
19 | return(
|
---|
20 | <Redirect to={"/login"}/>
|
---|
21 | );
|
---|
22 | }
|
---|
23 |
|
---|
24 | export default Profile; |
---|
Note:
See
TracBrowser
for help on using the repository browser.