Fix build errors
This commit is contained in:
@@ -104,7 +104,6 @@ export default function ReleasesExplorer({
|
||||
const json: Paged<Item> = await res.json();
|
||||
setData(json);
|
||||
} catch (e) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.error(e);
|
||||
setData({ items: [], page: 1, pageSize, total: 0 });
|
||||
} finally {
|
||||
@@ -117,7 +116,6 @@ export default function ReleasesExplorer({
|
||||
setData(initial);
|
||||
setPage(initial.page);
|
||||
}
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [initial]);
|
||||
|
||||
useEffect(() => {
|
||||
@@ -141,7 +139,6 @@ export default function ReleasesExplorer({
|
||||
}
|
||||
updateUrl(page);
|
||||
fetchData(q, page);
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [page, year, sort, dLanguageId, dMachinetypeId, filetypeId, schemetypeId, sourcetypeId, casetypeId, isDemo]);
|
||||
|
||||
function onSubmit(e: React.FormEvent) {
|
||||
@@ -286,7 +283,7 @@ export default function ReleasesExplorer({
|
||||
<label className="form-check-label" htmlFor="demoCheck">Demo only</label>
|
||||
</div>
|
||||
<div className="col-auto">
|
||||
<select className="form-select" value={sort} onChange={(e) => { setSort(e.target.value); setPage(1); }}>
|
||||
<select className="form-select" value={sort} onChange={(e) => { setSort(e.target.value as typeof sort); setPage(1); }}>
|
||||
<option value="year_desc">Sort: Newest</option>
|
||||
<option value="year_asc">Sort: Oldest</option>
|
||||
<option value="title">Sort: Title</option>
|
||||
|
||||
Reference in New Issue
Block a user