Skip to content

Commit

Permalink
Update middleware-upgrade-guide to be consistent (#38102)
Browse files Browse the repository at this point in the history
Update middleware-upgrade-guide.md

Ensure that before and after examples are consistent
  • Loading branch information
dominiksipowicz committed Jun 28, 2022
1 parent 9cc1c3c commit a90349d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions errors/middleware-upgrade-guide.md
Expand Up @@ -171,6 +171,7 @@ As well as other extended methods from `Map`.
#### Before

```javascript
// pages/_middleware.ts
import { NextResponse } from 'next/server'
import type { NextRequest } from 'next/server'

Expand Down Expand Up @@ -246,7 +247,7 @@ The helper is imported from `next/server` and allows you to opt in to using the
#### Before

```typescript
// middleware.ts
// pages/_middleware.ts
import { NextRequest, NextResponse } from 'next/server'

export function middleware(request: NextRequest) {
Expand Down Expand Up @@ -291,7 +292,7 @@ Use [`URLPattern`](https://developer.mozilla.org/en-US/docs/Web/API/URLPattern)
#### Before

```typescript
// middleware.ts
// pages/_middleware.ts
import { NextResponse } from 'next/server'
import type { NextRequest } from 'next/server'

Expand Down

0 comments on commit a90349d

Please sign in to comment.