mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-06 19:25:22 +03:00
Use searchParams inside eventsFetcher
This commit is contained in:
parent
e52eced7a0
commit
f810e7cf0e
@ -88,13 +88,13 @@ export default function Events({ path, ...props }) {
|
||||
});
|
||||
|
||||
const eventsFetcher = useCallback((path, params) => {
|
||||
if (params.event) {
|
||||
path = `${path}/${params.event}`;
|
||||
if (searchParams.event) {
|
||||
path = `${path}/${searchParams.event}`;
|
||||
return axios.get(path).then((res) => [res.data]);
|
||||
}
|
||||
params = { ...params, include_thumbnails: 0, limit: API_LIMIT };
|
||||
return axios.get(path, { params }).then((res) => res.data);
|
||||
}, []);
|
||||
}, [searchParams]);
|
||||
|
||||
const getKey = useCallback(
|
||||
(index, prevData) => {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user