Skip to content

[P1.1] Next.js 16 prep: useRouter().pathname → usePathname() #928

@frano-m

Description

@frano-m

Parent: #884 (Next.js 16 Upgrade Plan)

Scope

Migrate findable-ui call sites using useRouter().pathname (from next/router) to usePathname() (from next/navigation). Approximately 5 call sites.

Tasks

  • Grep for useRouter().pathname and router.pathname patterns under src/.
  • For each, replace with usePathname().
  • Remove the now-unused useRouter import if no other router APIs are used in the file.
  • Verify type signatures (usePathname() returns string | null — handle null where needed).
  • Run npm run lint && npm test.

Acceptance

  • All useRouter().pathname sites migrated.
  • Tests pass.
  • No behavior regression.

Part of #884.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions