MCPcopy
hub / github.com/adrianhajdin/project_next13_car_showcase / handleNavigation

Function handleNavigation

components/ShowMore.tsx:12–20  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

10 const router = useRouter();
11
12 const handleNavigation = () => {
13 // Calculate the new limit based on the page number and navigation type
14 const newLimit = (pageNumber + 1) * 10;
15
16 // Update the "limit" search parameter in the URL with the new value
17 const newPathname = updateSearchParams("limit", `${newLimit}`);
18
19 router.push(newPathname);
20 };
21
22 return (
23 <div className="w-full flex-center gap-5 mt-10">

Callers

nothing calls this directly

Calls 1

updateSearchParamsFunction · 0.70

Tested by

no test coverage detected