From b38efa6191699a49924dad58109daf6c5131e13d Mon Sep 17 00:00:00 2001 From: Sander Vocke Date: Wed, 23 Sep 2020 17:21:18 +0200 Subject: [PATCH] Performance improved a bit by factoring code. --- client/src/components/tables/ResultsTable.tsx | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/client/src/components/tables/ResultsTable.tsx b/client/src/components/tables/ResultsTable.tsx index cd56e8e..cce223f 100644 --- a/client/src/components/tables/ResultsTable.tsx +++ b/client/src/components/tables/ResultsTable.tsx @@ -27,12 +27,17 @@ export interface IProps { } export default function SongTable(props: IProps) { - const useTableStyles = makeStyles({ + const classes = makeStyles({ + button: { + textTransform: "none", + fontWeight: 400, + paddingLeft: '0', + textAlign: 'left', + }, table: { minWidth: 650, }, - }); - const classes = useTableStyles(); + })(); return ( @@ -131,14 +136,6 @@ export default function SongTable(props: IProps) { }); const TextCell = (props: any) => { - const classes = makeStyles({ - button: { - textTransform: "none", - fontWeight: 400, - paddingLeft: '0', - textAlign: 'left', - } - })(); return