13 lines
490 B
TypeScript
13 lines
490 B
TypeScript
import { createNavigation } from 'next-intl/navigation';
|
|
|
|
import { routing } from './routing';
|
|
|
|
/**
|
|
* Locale-aware replacements for `next/link` and the navigation hooks.
|
|
*
|
|
* Always import `Link` from here rather than `next/link`: these variants add
|
|
* the locale prefix automatically, so a link written once works in both
|
|
* languages and a language switch preserves the current page.
|
|
*/
|
|
export const { Link, redirect, usePathname, useRouter, getPathname } = createNavigation(routing);
|