Last change
on this file since 47f4eaf was 7e88e46, checked in by Marko <Marko@…>, 2 years ago |
Added more components
|
-
Property mode
set to
100644
|
File size:
1018 bytes
|
Rev | Line | |
---|
[7e88e46] | 1 | import React, { Component } from 'react'
|
---|
| 2 | import './UserComponent.css'
|
---|
| 3 |
|
---|
| 4 | export 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 |
|
---|
| 36 | export default UserComponent
|
---|
Note:
See
TracBrowser
for help on using the repository browser.