Changeset fc8421e for client_app
- Timestamp:
- 01/10/21 21:57:22 (4 years ago)
- Branches:
- master
- Children:
- 5f9d25a
- Parents:
- 6f9b7b0
- Location:
- client_app/src/components
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
client_app/src/components/data/components/user_profile.js
r6f9b7b0 rfc8421e 1 1 import React from 'react'; 2 import { Container, Header, List} from 'semantic-ui-react'2 import { Container, Header, Table, Item } from 'semantic-ui-react' 3 3 4 4 const UserDetails = (props) =>{ 5 5 return( 6 <Container >6 <Container textAlign="left"> 7 7 <Header>Welcome</Header> 8 <br /> 9 <h3>User: {props.data.name}</h3> 10 <table> 11 <tr> 12 <td> 13 <h3>Retained skills</h3> 14 <ul> 15 {props.data.retained.map((value, index) => { 16 return <li key={index}>{value.name}</li> 17 })} 18 </ul> 19 </td> 20 <td> 21 <h3>Skills you want to learn</h3> 22 <ul> 8 <h3>{props.data.name} {props.data.surname}</h3> 9 <h2>E-mail: {props.data.email}</h2> 10 <Table celled> 11 <Table.Header> 12 <Table.Row> 13 <Table.HeaderCell>Retained Skills:</Table.HeaderCell> 14 <Table.HeaderCell>Skills to Learn:</Table.HeaderCell> 15 </Table.Row> 16 </Table.Header> 17 <Table.Body> 18 <Table.Row> 19 <Table.Cell active> 20 {props.data.retained.map((value, index) => { 21 return <Item key={index}>{value.name}</Item> 22 })} 23 </Table.Cell> 24 <Table.Cell active> 23 25 {props.data.toLearn.map((value, index) => { 24 return < li key={index}>{value.name}</li>26 return <Item key={index}>{value.name}</Item> 25 27 })} 26 </ ul>27 </ td>28 </ tr>29 </ table>28 </Table.Cell> 29 </Table.Row> 30 </Table.Body> 31 </Table> 30 32 </Container> 31 33 ); -
client_app/src/components/main/App.js
r6f9b7b0 rfc8421e 7 7 import './App.css'; 8 8 import UserLogin from "../../repository/login_repo"; 9 import UserJobs from "../data/components/user_jobs"; 9 10 10 11 class App extends Component{ … … 14 15 logged: false, 15 16 error: null, 16 currentUser: {} 17 currentUser: { 18 } 17 19 } 18 20 } … … 25 27 <Route path={"/login"} render={() => <Login error={this.state.error} onCompleteForm={this.attemptLogin} loggedIn={this.state.logged}/>}/> 26 28 <Route path={"/profile"} render={() => <Profile userProfile={this.state.currentUser}/>}/> 29 <Route path={"/jobs"} render={() => <UserJobs userProfile={this.state.currentUser}/>}/> 27 30 <Route path={"/"} render={() => <Redirect to={"/login"}/>}/> 28 31 </main>
Note:
See TracChangeset
for help on using the changeset viewer.