source: phonelux-frontend/src/components/UserComponent/UserComponent.js@ 7e88e46

Last change on this file since 7e88e46 was 7e88e46, checked in by Marko <Marko@…>, 22 months ago

Added more components

  • Property mode set to 100644
File size: 1018 bytes
Line 
1import React, { Component } from 'react'
2import './UserComponent.css'
3
4export class UserComponent extends Component {
5
6 constructor(props) {
7 super(props)
8
9 this.state = {
10
11 }
12 }
13
14
15 render() {
16 return (
17 <tr className='superadmin-section-table-row'>
18 <td>{this.props.firstname}</td>
19 <td>{this.props.lastname}</td>
20 <td>{this.props.email}</td>
21 <td>{this.props.role == 'USER' ? 'Регистриран корисник' : 'Администратор'}</td>
22 <td>{
23 this.props.role == 'USER' ?
24 <button onClick={() => this.props.addAdmin(this.props.id)} className='superadmin-addadmin-button'>
25 Додај админ привилегии
26 </button> :
27 <button onClick={() => this.props.removeAdmin(this.props.id)} className='superadmin-removeadmin-button'>
28 Одземи админ привилегии
29 </button>
30 }</td>
31 </tr>
32 )
33 }
34}
35
36export default UserComponent
Note: See TracBrowser for help on using the repository browser.