From 702db84e39bf6ee43de51ded9bd4dd154171f4ed Mon Sep 17 00:00:00 2001 From: Ildar Kamalov Date: Thu, 23 May 2019 15:06:33 +0300 Subject: [PATCH] * client: remove redundant table formatting for runtime clients table --- .../Settings/Clients/AutoClients.js | 38 +++++-------------- 1 file changed, 10 insertions(+), 28 deletions(-) diff --git a/client/src/components/Settings/Clients/AutoClients.js b/client/src/components/Settings/Clients/AutoClients.js index 1f750909..efbe5933 100644 --- a/client/src/components/Settings/Clients/AutoClients.js +++ b/client/src/components/Settings/Clients/AutoClients.js @@ -34,42 +34,24 @@ class AutoClients extends Component { return ''; }; + cellWrap = ({ value }) => ( +
+ + {value} + +
+ ); + columns = [ { Header: this.props.t('table_client'), accessor: 'ip', - Cell: (row) => { - if (row.value) { - return ( -
- - {row.value} (IP) - -
- ); - } else if (row.original && row.original.mac) { - return ( -
- - {row.original.mac} (MAC) - -
- ); - } - - return ''; - }, + Cell: this.cellWrap, }, { Header: this.props.t('table_name'), accessor: 'name', - Cell: ({ value }) => ( -
- - {value} - -
- ), + Cell: this.cellWrap, }, { Header: this.props.t('table_statistics'),