Skip to content

Commit

Permalink
[docs] Add pre-requisites to Next integration docs (#4473)
Browse files Browse the repository at this point in the history
  • Loading branch information
bharatkashyap authored Nov 27, 2024
1 parent b67c51f commit eaffe36
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
20 changes: 20 additions & 0 deletions docs/data/toolpad/core/integrations/nextjs-approuter.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,26 @@ title: Next.js - Integration

<p class="description">This guide walks you through adding Toolpad Core to an existing Next.js app.</p>

## Prerequisites

Ensure that you have `@mui/material` and `next` installed. You also need the following to make the integration work correctly:

<codeblock storageKey="package-manager">

```bash npm
npm install @mui/material-nextjs @emotion/cache
```

```bash pnpm
pnpm add @mui/material-nextjs @emotion/cache
```

```bash yarn
yarn add install @mui/material-nextjs @emotion/cache
```

</codeblock>

## Wrap your application with `AppProvider`

In your root layout file (for example, `app/layout.tsx`), wrap your application with the `AppProvider`:
Expand Down
20 changes: 20 additions & 0 deletions docs/data/toolpad/core/integrations/nextjs-pagesrouter.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,26 @@ title: Next.js - Integration

<p class="description">This guide walks you through adding Toolpad Core to an existing Next.js app.</p>

## Prerequisites

Ensure that you have `@mui/material` and `next` installed. You also need the following to make the integration work correctly:

<codeblock storageKey="package-manager">

```bash npm
npm install @mui/material-nextjs @emotion/cache
```

```bash pnpm
pnpm add @mui/material-nextjs @emotion/cache
```

```bash yarn
yarn add install @mui/material-nextjs @emotion/cache
```

</codeblock>

## Wrap your application with `AppProvider`

In your root layout file (for example, `pages/_app.tsx`), wrap your application with the `AppProvider`:
Expand Down

0 comments on commit eaffe36

Please sign in to comment.