Performance improved a bit by factoring code.

pull/21/head
Sander Vocke 5 years ago
parent 97eb32bfb6
commit b38efa6191
  1. 19
      client/src/components/tables/ResultsTable.tsx

@ -27,12 +27,17 @@ export interface IProps {
} }
export default function SongTable(props: IProps) { export default function SongTable(props: IProps) {
const useTableStyles = makeStyles({ const classes = makeStyles({
button: {
textTransform: "none",
fontWeight: 400,
paddingLeft: '0',
textAlign: 'left',
},
table: { table: {
minWidth: 650, minWidth: 650,
}, },
}); })();
const classes = useTableStyles();
return ( return (
<TableContainer component={Paper}> <TableContainer component={Paper}>
@ -131,14 +136,6 @@ export default function SongTable(props: IProps) {
}); });
const TextCell = (props: any) => { const TextCell = (props: any) => {
const classes = makeStyles({
button: {
textTransform: "none",
fontWeight: 400,
paddingLeft: '0',
textAlign: 'left',
}
})();
return <TableCell padding="none" {...props}> return <TableCell padding="none" {...props}>
<Button className={classes.button} fullWidth={true} onClick={props._onClick}> <Button className={classes.button} fullWidth={true} onClick={props._onClick}>
<Box <Box

Loading…
Cancel
Save