Last change
on this file since b5a3a10 was 2e507a8, checked in by Vzdra <vladko.zdravkovski@…>, 4 years ago |
front end additions
|
-
Property mode
set to
100644
|
File size:
1.3 KB
|
Line | |
---|
1 | import React from 'react';
|
---|
2 | import UserDetails from "./components/profiles/user_profile";
|
---|
3 | import { Redirect } from "react-router-dom";
|
---|
4 | import CompanyProfile from "./components/profiles/company_profile";
|
---|
5 | import TeamProfile from "./components/profiles/team_profile";
|
---|
6 |
|
---|
7 | const Profile = (props) => {
|
---|
8 |
|
---|
9 | if(props.userProfile.type==="USER"){
|
---|
10 | return (
|
---|
11 | <UserDetails data={{
|
---|
12 | email: props.userProfile.email,
|
---|
13 | name: props.userProfile.name,
|
---|
14 | surname: props.userProfile.surname,
|
---|
15 | retained: props.userProfile.retained,
|
---|
16 | toLearn: props.userProfile.toLearn
|
---|
17 | }}/>
|
---|
18 | );
|
---|
19 | }
|
---|
20 |
|
---|
21 | if(props.userProfile.type==="COMPANY"){
|
---|
22 | return (
|
---|
23 | <CompanyProfile data={{
|
---|
24 | email: props.userProfile.email,
|
---|
25 | name: props.userProfile.name,
|
---|
26 | address: props.userProfile.address
|
---|
27 | }}/>
|
---|
28 | );
|
---|
29 | }
|
---|
30 |
|
---|
31 | if(props.userProfile.type==="TEAM"){
|
---|
32 | return (
|
---|
33 | <TeamProfile data={{
|
---|
34 | email: props.userProfile.email,
|
---|
35 | name: props.userProfile.name,
|
---|
36 | members: props.userProfile.members
|
---|
37 | }}/>
|
---|
38 | );
|
---|
39 | }
|
---|
40 |
|
---|
41 | return(
|
---|
42 | <Redirect to={"/login"}/>
|
---|
43 | );
|
---|
44 | }
|
---|
45 |
|
---|
46 | export default Profile; |
---|
Note:
See
TracBrowser
for help on using the repository browser.