@@ -4,14 +4,13 @@ import { shape, func, arrayOf } from 'prop-types';
44import { pipe , map , sort as rSort } from 'ramda' ;
55import memoize from 'fast-memoize' ;
66import { camelCase } from 'change-case/change-case' ;
7+ import { withStyles } from '@material-ui/core/styles' ;
78import TableRow from '@material-ui/core/TableRow' ;
89import TableCell from '@material-ui/core/TableCell' ;
9- import ListItemText from '@material-ui/core/ListItemText' ;
1010import Typography from '@material-ui/core/Typography' ;
1111import LinkIcon from 'mdi-react/LinkIcon' ;
1212import ConnectionDataTable from '../ConnectionDataTable' ;
1313import DateDistance from '../DateDistance' ;
14- import TableCellListItem from '../TableCellListItem' ;
1514import { VIEW_CLIENTS_PAGE_SIZE } from '../../utils/constants' ;
1615import { pageInfo , client } from '../../utils/prop-types' ;
1716import sort from '../../utils/sort' ;
@@ -21,6 +20,18 @@ const sorted = pipe(
2120 map ( ( { node : { clientId } } ) => clientId )
2221) ;
2322
23+ @withStyles ( theme => ( {
24+ tableCell : {
25+ textDecoration : 'none' ,
26+ } ,
27+ listItemCell : {
28+ display : 'flex' ,
29+ justifyContent : 'space-between' ,
30+ width : '100%' ,
31+ padding : theme . spacing . unit ,
32+ ...theme . mixins . hover ,
33+ } ,
34+ } ) )
2435export default class ClientsTable extends Component {
2536 static propTypes = {
2637 clientsConnection : shape ( {
@@ -76,7 +87,7 @@ export default class ClientsTable extends Component {
7687 } ;
7788
7889 render ( ) {
79- const { onPageChange, clientsConnection } = this . props ;
90+ const { classes , onPageChange, clientsConnection } = this . props ;
8091 const { sortBy, sortDirection } = this . state ;
8192 const iconSize = 16 ;
8293
@@ -95,19 +106,16 @@ export default class ClientsTable extends Component {
95106 onPageChange = { onPageChange }
96107 renderRow = { ( { node : client } ) => (
97108 < TableRow key = { client . clientId } >
98- < TableCell >
99- < TableCellListItem
100- dense
101- button
102- component = { Link }
109+ < TableCell padding = "dense" >
110+ < Link
111+ className = { classes . tableCell }
103112 to = { `/auth/clients/${ encodeURIComponent ( client . clientId ) } ` }
104113 >
105- < ListItemText
106- disableTypography
107- primary = { < Typography > { client . clientId } </ Typography > }
108- />
109- < LinkIcon size = { iconSize } />
110- </ TableCellListItem >
114+ < div className = { classes . listItemCell } >
115+ < Typography > { client . clientId } </ Typography >
116+ < LinkIcon size = { iconSize } />
117+ </ div >
118+ </ Link >
111119 </ TableCell >
112120 < TableCell >
113121 < DateDistance from = { client . lastDateUsed } />
0 commit comments