linting fixes
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/tag Build is failing Details

Signed-off-by: Martyn Ranyard <m@rtyn.berlin>
This commit is contained in:
Martyn 2020-08-01 11:58:21 +02:00
parent cb1929a245
commit c783586027
4 changed files with 7 additions and 7 deletions

View File

@ -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 (
<ProblemContainer />

View File

@ -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');

View File

@ -106,7 +106,7 @@ function TopTenSingers() {
setSingerState({duetData: data, loading: false })
}));
}
}, [setSingerState]);
}, [setSingerState, singerState.loading]);
if (singerState.loading) {
return <p>Sorry, still loading...</p>

View File

@ -107,7 +107,7 @@ function TopTenSongs() {
setSongState({duetData: data, loading: false })
}));
}
}, [setSongState]);
}, [setSongState, songState.loading]);
if (songState.loading) {
return <p>Sorry, still loading...</p>