Function
The locale-aware router
Exported from @/i18n/navigation as useRouter, so call sites get the
motion without asking for it. Everything the caller passes still reaches
next-intl: locale switches locale as before, and an explicit
transitionTypes replaces the computed one for a call site that knows
better.
The returned router keeps its identity while the route stays the same. Effects list it as a dependency, and a new object per render would re-run every one of them.
next-intl's router, with
pushandreplacetagging each navigation with the route transition for where it starts and where it lands.