Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[docs] Fix 404 link from Joy to React Router #34115

Merged
merged 1 commit into from Aug 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 8 additions & 8 deletions docs/data/joy/components/link/link.md
Expand Up @@ -87,28 +87,28 @@ Here's how you can use the link component with libraries that also provide their

### Next.js

Based on the [Links API reference documentation](https://nextjs.org/docs/api-reference/next/link#if-the-child-is-a-custom-component-that-wraps-an-a-tag).
Here is an example with the [Link component](https://nextjs.org/docs/api-reference/next/link) of Next.js:

```js
import NextLink from 'next/link';
import JoyLink from '@mui/joy/Link';
import Link from '@mui/joy/Link';

<NextLink href="/docs" passHref>
<JoyLink>Read doc</JoyLink>
<Link>Read doc</Link>
</NextLink>;
```

### React router
### React Router

Based on the [Link found in React router's latets version](https://reactrouter.com/docs/en/v6/components/link).
Here is an example with the [Link component](https://reactrouter.com/en/main/components/link) of React Router:

```js
import { Link as RouterLink } from 'react-router-dom';
import JoyLink from '@mui/joy/Link';
import Link from '@mui/joy/Link';

<JoyLink component={RouterLink} to="/docs">
<Link component={RouterLink} to="/docs">
Read doc
</JoyLink>;
</Link>;
```

## Common examples
Expand Down
3 changes: 1 addition & 2 deletions docs/data/material/guides/routing/routing.md
Expand Up @@ -99,8 +99,7 @@ const LinkBehavior = React.forwardRef((props, ref) => (

### Next.js

Next.js has [a custom Link component](https://nextjs.org/docs/api-reference/next/link).
The [example folder](https://github.com/mui/material-ui/tree/HEAD/examples/nextjs-with-typescript) provides adapters for usage with MUI.
The [example folder](https://github.com/mui/material-ui/tree/HEAD/examples/nextjs-with-typescript) provides an adapter for the use of [Next.js's Link component](https://nextjs.org/docs/api-reference/next/link) with MUI.

- The first version of the adapter is the [`NextLinkComposed`](https://github.com/mui/material-ui/blob/HEAD/examples/nextjs-with-typescript/src/Link.tsx) component.
This component is unstyled and only responsible for handling the navigation.
Expand Down
3 changes: 1 addition & 2 deletions examples/nextjs-with-typescript/README.md
Expand Up @@ -33,8 +33,7 @@ It includes `@mui/material` and its peer dependencies, including `emotion`, the

## The link component

Next.js has [a custom Link component](https://nextjs.org/docs/api-reference/next/link).
The example folder provides adapters for usage with MUI.
The [example folder](https://github.com/mui/material-ui/tree/HEAD/examples/nextjs-with-typescript) provides an adapter for the use of [Next.js's Link component](https://nextjs.org/docs/api-reference/next/link) with MUI.
More information [in the documentation](https://mui.com/material-ui/guides/routing/#next-js).

## What's next?
Expand Down
3 changes: 1 addition & 2 deletions examples/nextjs/README.md
Expand Up @@ -34,8 +34,7 @@ If you prefer, you can [use styled-components instead](https://mui.com/material-

## The link component

Next.js has [a custom Link component](https://nextjs.org/docs/api-reference/next/link).
The example folder provides adapters for usage with MUI.
The [example folder](https://github.com/mui/material-ui/tree/HEAD/examples/nextjs-with-typescript) provides an adapter for the use of [Next.js's Link component](https://nextjs.org/docs/api-reference/next/link) with MUI.
More information [in the documentation](https://mui.com/material-ui/guides/routing/#next-js).

## What's next?
Expand Down