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>) {
|
||||
const merged = { ...current, ...patch };
|
||||
const href = `${pathname}${buildHref(current, { page: undefined, ...patch })}`;
|
||||
// eslint-disable-next-line no-console
|
||||
console.log("[VinsFilterBar.nav]", { patch, href, pathname, current });
|
||||
startTransition(() => {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log("[VinsFilterBar.nav.push]", href);
|
||||
router.push(href);
|
||||
});
|
||||
console.log(
|
||||
"[VinsFilterBar.nav] patch=" +
|
||||
JSON.stringify(patch) +
|
||||
" current=" +
|
||||
JSON.stringify(current) +
|
||||
" merged=" +
|
||||
JSON.stringify(merged) +
|
||||
" href=" +
|
||||
href,
|
||||
);
|
||||
startTransition(() => router.push(href));
|
||||
}
|
||||
|
||||
function submitSearch(e: React.FormEvent<HTMLFormElement>) {
|
||||
|
||||
Reference in New Issue
Block a user