source: client_app/src/components/data/profile.js@ a70db1a

Last change on this file since a70db1a was 6f9b7b0, checked in by i-ina <76742075+i-ina@…>, 3 years ago

user login

  • Property mode set to 100644
File size: 603 bytes
Line 
1import React from 'react';
2import UserDetails from "./components/user_profile";
3import { Redirect } from "react-router-dom";
4
5const 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
24export default Profile;
Note: See TracBrowser for help on using the repository browser.