Skip to content

Commit

Permalink
docs: @-imports for example-app-router-playground
Browse files Browse the repository at this point in the history
  • Loading branch information
amannn committed Aug 14, 2024
1 parent 88dfb10 commit bfa031c
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use client';

import {useNow, useTimeZone, useLocale} from 'next-intl';
import {Link, usePathname} from '../../../navigation';
import {Link, usePathname} from '@/navigation';

export default function ClientContent() {
const now = useNow();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use client';

import {redirect} from '../../../../navigation';
import {redirect} from '@/navigation';

export default function ClientRedirectPage() {
redirect('/client');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use client';

import {usePathname} from '../../../navigation';
import {usePathname} from '@/navigation';

export default function UnlocalizedPathname() {
return <p data-testid="UnlocalizedPathname">{usePathname()}</p>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import LocaleSwitcher from '../../components/LocaleSwitcher';
import PageLayout from '../../components/PageLayout';
import MessagesAsPropsCounter from '../../components/client/01-MessagesAsPropsCounter';
import MessagesOnClientCounter from '../../components/client/02-MessagesOnClientCounter';
import {Link} from '../../navigation';
import {Link} from '@/navigation';

type Props = {
searchParams: Record<string, string>;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {redirect} from '../../../navigation';
import {redirect} from '@/navigation';

export default function Redirect() {
redirect('/client');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use client';

import {ComponentProps} from 'react';
import {Link, pathnames} from '../navigation';
import {Link, pathnames} from '@/navigation';

export default function NavigationLink<Pathname extends keyof typeof pathnames>(
props: ComponentProps<typeof Link<Pathname>>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use client';

import {useRouter} from '../navigation';
import {useRouter} from '@/navigation';

export default function ClientRouterWithoutProvider() {
const router = useRouter();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {useLocale, useTranslations} from 'next-intl';
import {Link} from '../navigation';
import {Link} from '@/navigation';

export default function LocaleSwitcher() {
const t = useTranslations('LocaleSwitcher');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import {useSelectedLayoutSegment} from 'next/navigation';
import {ComponentProps} from 'react';
import {Link, pathnames} from '../navigation';
import {Link, pathnames} from '@/navigation';

export default function NavigationLink<
Pathname extends keyof typeof pathnames
Expand Down
2 changes: 1 addition & 1 deletion examples/example-app-router-playground/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
}
],
"paths": {
"@/components/*": ["./src/components/*"]
"@/*": ["./src/*"]
}
},
"include": [
Expand Down

0 comments on commit bfa031c

Please sign in to comment.