Skip to content

Commit

Permalink
Merge branch 'canary' into eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
housseindjirdeh authored Apr 5, 2021
2 parents 74f5daa + 9986d7c commit 80808a0
Show file tree
Hide file tree
Showing 66 changed files with 874 additions and 607 deletions.
12 changes: 6 additions & 6 deletions docs/api-reference/next/router.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ import { useRouter } from 'next/router'
export default function Page() {
const router = useRouter()

return <span onClick={() => router.push('/post/abc')}>Click me</span>
return <button onClick={() => router.push('/post/abc')}>Click me</button>
}
```

Expand Down Expand Up @@ -137,7 +137,7 @@ export default function ReadMore({ post }) {
const router = useRouter()

return (
<span
<button
onClick={() => {
router.push({
pathname: '/post/[pid]',
Expand All @@ -146,7 +146,7 @@ export default function ReadMore({ post }) {
}}
>
Click here to read more
</span>
</button>
)
}
```
Expand All @@ -171,7 +171,7 @@ import { useRouter } from 'next/router'
export default function Page() {
const router = useRouter()

return <span onClick={() => router.replace('/home')}>Click me</span>
return <button onClick={() => router.replace('/home')}>Click me</button>
}
```

Expand Down Expand Up @@ -282,7 +282,7 @@ import { useRouter } from 'next/router'
export default function Page() {
const router = useRouter()

return <span onClick={() => router.back()}>Click here to go back</span>
return <button onClick={() => router.back()}>Click here to go back</button>
}
```

Expand All @@ -298,7 +298,7 @@ import { useRouter } from 'next/router'
export default function Page() {
const router = useRouter()

return <span onClick={() => router.reload()}>Click here to reload</span>
return <button onClick={() => router.reload()}>Click here to reload</button>
}
```

Expand Down
20 changes: 8 additions & 12 deletions examples/custom-routes-proxying/next.config.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
module.exports = {
async rewrites() {
return [
// we need to define a no-op rewrite to trigger checking
// all pages/static files before we attempt proxying
{
source: '/:path*',
destination: '/:path*',
},
{
source: '/:path*',
destination: `https://custom-routes-proxying-endpoint.vercel.app/:path*`,
},
]
return {
fallback: [
{
source: '/:path*',
destination: `https://custom-routes-proxying-endpoint.vercel.app/:path*`,
},
],
}
},
}
6 changes: 3 additions & 3 deletions examples/custom-server-express/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ npm install body-parser

Use the package within server.js:

```bash
const bodyParser = require('body-parser');
```js
const bodyParser = require('body-parser')

app.prepare().then(() => {
const server = express();
const server = express()
server.use(bodyParser.urlencoded({ extended: true }))
server.use(bodyParser.json())
})
Expand Down
4 changes: 0 additions & 4 deletions examples/with-glamor/.babelrc

This file was deleted.

34 changes: 0 additions & 34 deletions examples/with-glamor/.gitignore

This file was deleted.

25 changes: 0 additions & 25 deletions examples/with-glamor/README.md

This file was deleted.

16 changes: 0 additions & 16 deletions examples/with-glamor/next.config.js

This file was deleted.

17 changes: 0 additions & 17 deletions examples/with-glamor/package.json

This file was deleted.

36 changes: 0 additions & 36 deletions examples/with-glamor/pages/_document.js

This file was deleted.

17 changes: 0 additions & 17 deletions examples/with-glamor/pages/index.js

This file was deleted.

8 changes: 4 additions & 4 deletions examples/with-mqtt-js/.env.local.example
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
NEXT_MQTT_URI="wss://test.mosquitto.org:8081/mqtt"
NEXT_MQTT_CLIENTID="a_client_id"
NEXT_MQTT_USERNAME="username"
CONTENTFUL_PREVIEW_SECRET="a_secure_password"
NEXT_PUBLIC_MQTT_URI="wss://test.mosquitto.org:8081/mqtt"
NEXT_PUBLIC_MQTT_CLIENTID="a_client_id"
NEXT_PUBLIC_MQTT_USERNAME="username"
NEXT_PUBLIC_MQTT_PASSWORD="a_secure_password"
34 changes: 0 additions & 34 deletions examples/with-style-sheet/.gitignore

This file was deleted.

21 changes: 0 additions & 21 deletions examples/with-style-sheet/README.md

This file was deleted.

23 changes: 0 additions & 23 deletions examples/with-style-sheet/babel.config.js

This file was deleted.

5 changes: 0 additions & 5 deletions examples/with-style-sheet/lib/styleSheet.js

This file was deleted.

17 changes: 0 additions & 17 deletions examples/with-style-sheet/next.config.js

This file was deleted.

19 changes: 0 additions & 19 deletions examples/with-style-sheet/package.json

This file was deleted.

Loading

0 comments on commit 80808a0

Please sign in to comment.