mirror of
https://github.com/umami-software/umami.git
synced 2026-02-07 22:27:16 +01:00
Refactor part 2: Electric Boogaloo. Standardize way of passing filter parameters.
This commit is contained in:
parent
f26f1b0581
commit
cdf391d5c2
90 changed files with 867 additions and 709 deletions
16
src/components/hooks/uesPageParameters.ts
Normal file
16
src/components/hooks/uesPageParameters.ts
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import { useMemo } from 'react';
|
||||
import { useNavigation } from './useNavigation';
|
||||
|
||||
export function usePageParameters() {
|
||||
const {
|
||||
query: { page, pageSize, search },
|
||||
} = useNavigation();
|
||||
|
||||
return useMemo(() => {
|
||||
return {
|
||||
page,
|
||||
pageSize,
|
||||
search,
|
||||
};
|
||||
}, [page, pageSize, search]);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue