debug: expand JSON in nav log
This commit is contained in:
@@ -35,14 +35,20 @@ export function VinsFilterBar({ initial }: { initial: VinsSearchParams }) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
function nav(patch: Partial<VinsSearchParams>) {
|
function nav(patch: Partial<VinsSearchParams>) {
|
||||||
|
const merged = { ...current, ...patch };
|
||||||
const href = `${pathname}${buildHref(current, { page: undefined, ...patch })}`;
|
const href = `${pathname}${buildHref(current, { page: undefined, ...patch })}`;
|
||||||
// eslint-disable-next-line no-console
|
// eslint-disable-next-line no-console
|
||||||
console.log("[VinsFilterBar.nav]", { patch, href, pathname, current });
|
console.log(
|
||||||
startTransition(() => {
|
"[VinsFilterBar.nav] patch=" +
|
||||||
// eslint-disable-next-line no-console
|
JSON.stringify(patch) +
|
||||||
console.log("[VinsFilterBar.nav.push]", href);
|
" current=" +
|
||||||
router.push(href);
|
JSON.stringify(current) +
|
||||||
});
|
" merged=" +
|
||||||
|
JSON.stringify(merged) +
|
||||||
|
" href=" +
|
||||||
|
href,
|
||||||
|
);
|
||||||
|
startTransition(() => router.push(href));
|
||||||
}
|
}
|
||||||
|
|
||||||
function submitSearch(e: React.FormEvent<HTMLFormElement>) {
|
function submitSearch(e: React.FormEvent<HTMLFormElement>) {
|
||||||
|
|||||||
Reference in New Issue
Block a user