linting fixes
Signed-off-by: Martyn Ranyard <m@rtyn.berlin>
This commit is contained in:
parent
cb1929a245
commit
c783586027
|
@ -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 />
|
||||
|
|
|
@ -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');
|
||||
|
|
|
@ -106,7 +106,7 @@ function TopTenSingers() {
|
|||
setSingerState({duetData: data, loading: false })
|
||||
}));
|
||||
}
|
||||
}, [setSingerState]);
|
||||
}, [setSingerState, singerState.loading]);
|
||||
|
||||
if (singerState.loading) {
|
||||
return <p>Sorry, still loading...</p>
|
||||
|
|
|
@ -107,7 +107,7 @@ function TopTenSongs() {
|
|||
setSongState({duetData: data, loading: false })
|
||||
}));
|
||||
}
|
||||
}, [setSongState]);
|
||||
}, [setSongState, songState.loading]);
|
||||
|
||||
if (songState.loading) {
|
||||
return <p>Sorry, still loading...</p>
|
||||
|
|
Loading…
Reference in New Issue