Update middleware-upgrade-guide to be consistent (#38102)

Update middleware-upgrade-guide.md

Ensure that before and after examples are consistent
This commit is contained in:
Dom Sip 2022-06-28 13:48:57 +01:00 committed by GitHub
parent 9cc1c3c576
commit a90349d519
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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'
@ -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) {
@ -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'