chore: add typed ESLint checks #18
Refs WealthLedger/main#18. Keep Biome; add no Prettier dependencies.
This commit is contained in:
@@ -72,11 +72,9 @@ const useAccountOperationsPageVm = (
|
||||
}>({ scopeKey, cursors: [] });
|
||||
const cursors = pagination.scopeKey === scopeKey ? pagination.cursors : [];
|
||||
const cursor = cursors.at(-1);
|
||||
useEffect(() => {
|
||||
setPagination((current) =>
|
||||
current.scopeKey === scopeKey ? current : { scopeKey, cursors: [] },
|
||||
);
|
||||
}, [scopeKey]);
|
||||
if (pagination.scopeKey !== scopeKey) {
|
||||
setPagination({ scopeKey, cursors: [] });
|
||||
}
|
||||
useEffect(() => {
|
||||
if (validUrlPeriod) return;
|
||||
const normalized = new URLSearchParams(searchParams);
|
||||
@@ -84,7 +82,9 @@ const useAccountOperationsPageVm = (
|
||||
normalized.delete("to");
|
||||
setSearchParams(normalized, { replace: true });
|
||||
}, [validUrlPeriod, searchParams, setSearchParams]);
|
||||
useEffect(() => {
|
||||
const [previousSearch, setPreviousSearch] = useState(searchParams);
|
||||
if (previousSearch !== searchParams) {
|
||||
setPreviousSearch(searchParams);
|
||||
setDraftFrom(appliedFrom);
|
||||
setDraftTo(appliedTo);
|
||||
setDraftCategories(
|
||||
@@ -92,7 +92,7 @@ const useAccountOperationsPageVm = (
|
||||
(searchParams.get("categories") ?? "").split(",").includes(category),
|
||||
),
|
||||
);
|
||||
}, [appliedFrom, appliedTo, searchParams]);
|
||||
}
|
||||
const firstPageQuery = {
|
||||
from: dateStart(appliedFrom),
|
||||
to: dateEnd(appliedTo),
|
||||
|
||||
Reference in New Issue
Block a user