From c783586027a91d651194fc7a534948f1185b82da Mon Sep 17 00:00:00 2001 From: Martyn Ranyard Date: Sat, 1 Aug 2020 11:58:21 +0200 Subject: [PATCH] linting fixes Signed-off-by: Martyn Ranyard --- build/react-frontend/src/Components/AppAdmin/AppAdmin.js | 2 +- build/react-frontend/src/Components/DuetData/DuetData.js | 8 ++++---- .../src/Components/TopTenSingers/TopTenSingers.js | 2 +- .../src/Components/TopTenSongs/TopTenSongs.js | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/build/react-frontend/src/Components/AppAdmin/AppAdmin.js b/build/react-frontend/src/Components/AppAdmin/AppAdmin.js index 7a846e5..20201d8 100644 --- a/build/react-frontend/src/Components/AppAdmin/AppAdmin.js +++ b/build/react-frontend/src/Components/AppAdmin/AppAdmin.js @@ -45,7 +45,7 @@ function AppAdmin() { if ( (window.location.href.split("/").length < 6) || (window.location.href.split("/")[3].search(/^admin/) < 0) || - (window.location.href.split("/")[5].length != 48) + (window.location.href.split("/")[5].length !== 48) ) { return ( diff --git a/build/react-frontend/src/Components/DuetData/DuetData.js b/build/react-frontend/src/Components/DuetData/DuetData.js index 2a18598..5b829de 100644 --- a/build/react-frontend/src/Components/DuetData/DuetData.js +++ b/build/react-frontend/src/Components/DuetData/DuetData.js @@ -16,13 +16,13 @@ const headCells = [ ]; function descendingComparator(a, b, orderBy) { - if (orderBy == "displayPublishDate") { + if (orderBy === "displayPublishDate") { orderBy = "publishDate" } - if (orderBy == "displayLastSongDate") { + if (orderBy === "displayLastSongDate") { orderBy = "lastSongDate" } - if (orderBy == "displayLastDuetDate") { + if (orderBy === "displayLastDuetDate") { orderBy = "lastDuetDate" } if (b[orderBy] < a[orderBy]) { @@ -114,7 +114,7 @@ function DuetData() { setDuetState({duetData: data, loading: false }) })); } - }, [setDuetState]); + }, [setDuetState, duetState.loading]); const handleRequestSort = (event, property) => { const isAsc = orderBy === property && order === 'asc'; setOrder(isAsc ? 'desc' : 'asc'); diff --git a/build/react-frontend/src/Components/TopTenSingers/TopTenSingers.js b/build/react-frontend/src/Components/TopTenSingers/TopTenSingers.js index 59fab34..56b474c 100644 --- a/build/react-frontend/src/Components/TopTenSingers/TopTenSingers.js +++ b/build/react-frontend/src/Components/TopTenSingers/TopTenSingers.js @@ -106,7 +106,7 @@ function TopTenSingers() { setSingerState({duetData: data, loading: false }) })); } - }, [setSingerState]); + }, [setSingerState, singerState.loading]); if (singerState.loading) { return

Sorry, still loading...

diff --git a/build/react-frontend/src/Components/TopTenSongs/TopTenSongs.js b/build/react-frontend/src/Components/TopTenSongs/TopTenSongs.js index 7225a6b..ac44e2f 100644 --- a/build/react-frontend/src/Components/TopTenSongs/TopTenSongs.js +++ b/build/react-frontend/src/Components/TopTenSongs/TopTenSongs.js @@ -107,7 +107,7 @@ function TopTenSongs() { setSongState({duetData: data, loading: false }) })); } - }, [setSongState]); + }, [setSongState, songState.loading]); if (songState.loading) { return

Sorry, still loading...