Commit graph

2150 commits

Author SHA1 Message Date
Mahmoud Abdelwahab
f657e09b53
Fix CORS issue in GraphQL example that prevented Apollo Studio from working (#27486)
Update example so Apollo Studio works properly
2021-07-25 21:47:04 +00:00
Taylor McGann
270559f7be
Auth0 Example: Fix issuer base URL (#27074)
## Documentation / Examples

- [ ] Make sure the linting passes
2021-07-25 05:12:15 +00:00
Mohamed ElSaadany
9cbc4aacd5
Add locale switcher to i18n-routing example (#27444)
* add locale switcher to dynamic GSP page in i18n-routing example

* Apply suggestions from code review

Co-authored-by: JJ Kasper <jj@jjsweb.site>

* Add switcher to other pages as well

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2021-07-23 14:33:10 -05:00
Aryan Beezadhur
047347a0b4
Rename utils to lib in with-mongodb-mongoose example (#27407)
Rename the `utils` folder to `lib`, and update file imports since other examples favour `lib` over `utils`.
2021-07-22 16:55:47 +00:00
Aryan Beezadhur
f8947b0133
Rename util to lib in with-mongodb example (#27404)
* Rename examples/with-mongodb/util/mongodb.js to examples/with-mongodb/lib/mongodb.js

* Change file import from `util` to `lib`
2021-07-22 11:32:56 -05:00
Mandar Patil
c218347faa
Fixed typo and error when using Auth0 service; (#27383)
* Fixed typo and error when using Auth0 service;

`Allowed Web Origin` on Auth0 is now required to be set to `http://localhost:3000`

* lint-fix


Co-authored-by: JJ Kasper <jj@jjsweb.site>
2021-07-21 22:21:36 -05:00
Aryan Beezadhur
1b67dc163d
Examples: Delete as prop from <Link> components (#27359)
`as` prop is no longer required on `next/link` components for dynamic routes
2021-07-20 22:05:20 +00:00
Mahmoud Abdelwahab
c3884e6837
Update graphql example (#27334)
## Documentation / Examples

This is an update to the [GraphQL example](https://github.com/vercel/next.js/tree/canary/examples/api-routes-graphql) to use [apollo server 3](https://www.apollographql.com/docs/apollo-server). This example works with Apollo Studio
2021-07-20 15:19:22 +00:00
Thang Vu
9fc58f88a2
fix: hydration warning in with-mobx-state-tree-typescript example (#27339)
## Bug

- [x] Related issues linked using `fixes #number` fixes https://github.com/vercel/next.js/issues/27290
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [x] Make sure the linting passes
2021-07-20 14:15:02 +00:00
Sam Robbins
e0ca6de832
Update layout-component example to use named functions (#27331)
## Documentation / Examples

- [x] Make sure the linting passes

In line with the PR #27297 which solved issue #27252, this updates the example to also use named functions in order to pass ESLint
2021-07-20 14:02:51 +00:00
Sofya Tuymedova
0472f0fa81
Fix image link (#27323) 2021-07-20 10:33:50 +00:00
JJ Kasper
68cd5b12f9
Continue: Update blog-starter-typescript postcss.config.js (#27314)
* Update postcss.config.js

update postcss.config.js based nextjs guide: https://tailwindcss.com/docs/guides/nextjs

* Update examples/blog-starter-typescript/postcss.config.js

* lint-fix

Co-authored-by: Rubens de Melo <rubensdemelo@gmail.com>
Co-authored-by: Lee Robinson <me@leerob.io>
2021-07-19 19:34:01 -05:00
JJ Kasper
c082972b93
Continue: fix typo in breakpoint config (#27313) 2021-07-19 19:00:14 -05:00
Pavel Mineev
4e79481511
(examples/with-i18n-next-intl): fixes warning (#25928)
### Documentation / Examples

Fixed one of the items from #25854

- Fixes warning from `next-intl`
- Hides locale selector in case if no other location
- Fixes path `next/router` import 
- Removes unused variable

---

- [x] Add the StackBlitz button in README.md
- [x] Make sure the linting passes

[Live demo on StackBlitz](https://stackblitz.com/github/akellbl4/next.js/tree/fix/example-with-i18n-next-intl-missing-other/examples/with-i18n-next-intl)
2021-07-19 23:49:45 +00:00
Adam Cowley
9774d9b1e0
Optimised Cypher queries in Neo4j example (#25973)
Thank you for including a Neo4j example!

This PR rewrites the Cypher queries using a [pattern comprehension](https://neo4j.com/docs/cypher-manual/current/syntax/lists/#cypher-pattern-comprehension) which will make them more performant and removes the need for the `collect(DISTINCT ...)` step.
2021-07-19 20:18:40 +00:00
Brandon Chinn
7fea8f3de7
Remove redundant ssr option for styled-components (#27221)
Co-authored-by: JJ Kasper <jj@jjsweb.site>
2021-07-19 14:28:14 -05:00
qwertyforce
2b319ccfd9
update fastify example to the latest version (#27273)
* update fastify example to newest version

* Update examples/custom-server-fastify/server.js

Co-authored-by: Harsh Karande <harshskarande@gmail.com>

* lint-fix

Co-authored-by: Harsh Karande <harshskarande@gmail.com>
Co-authored-by: JJ Kasper <jj@jjsweb.site>
2021-07-19 10:44:38 -05:00
Houssein Djirdeh
6645248d41
[ESLint] Remove error when file patterns are unmatched + ESLint setup changes (#27119)
Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
2021-07-16 20:19:08 +02:00
André
057d338db4
Update cms-wordpress readme file (#27234)
## Documentation / Examples

- [x] Make sure the linting passes

- Removed references to [WPGraphiQL](https://github.com/wp-graphql/wp-graphiql) as it is now part of [WPGraphQL](https://github.com/wp-graphql/wp-graphql) plugin.
2021-07-16 15:17:27 +00:00
Munawwar
dd029f559f
updated zustand example for 3.5.4+ interface change (#27229)
## Documentation / Examples

- [✓] Make sure the linting passes
2021-07-16 13:41:52 +00:00
Thang Vu
530a2a397d
upgrade next-redux-wrapper to 7.0.2 (#26521)
## Bug

- [x] Related issues linked using `fixes #number`: Fixes #26338
- [ ] Integration tests added
2021-07-16 12:28:31 +00:00
Didi Keke
dc5bc3f2ff
Fix Prop href did not match error (#27183)
Resolve Prop `href` did not match error.
2021-07-15 01:04:05 +00:00
Didi Keke
1d08687b93
Fix Image is missing required "src" property error (#27180)
Add safety check for `CoverImage` in `/components/post-preview.js` so as to prevent error occurring in the absence of cover image for on posts listed for preview - fixes #23742.
2021-07-14 23:19:42 +00:00
Luc Leray
f52955ec94
Clean up examples package.json (#27121)
Clean up package.json files in the `examples` directory:
- Add `private: true`
- Remove `version` (because they are irrelevant for packages that are not meant to be published)
- Remove `name` (because they are optional for packages that are not meant to be published, and when someone clones an example, they often rename it and the property becomes stale)
- Remove `author`
- Remove `description`
- Remove `license`

Also remove `with-dynamic-app-layout` example completely, since it does the same as `layout-component` (https://github.com/vercel/next.js/pull/27121#discussion_r668178408).

## Documentation / Examples

- [x] Make sure the linting passes
2021-07-12 19:58:03 +00:00
markkaylor
36d00a74b6
[examples] Use Strapi template (#27114)
- Simplifies setting up a Strapi project by using the following template: https://github.com/strapi/strapi-template-next-example
- Adds seed data
- Fixes a broken link on the cover image

- [x] Make sure the linting passes
2021-07-12 16:24:43 +00:00
Enes Akar
655eb5cb5b
Fix tailwind error with Redis example. (#27042) 2021-07-12 10:35:50 -05:00
Rishabh Poddar
08f06e7a0d
Update SuperTokens dependency version in with-supertokens example (#27110)
- Updates supertokens-auth-react to v0.15.0
- In the supertokens example, handles 401 session expired automatically (via the lib).
2021-07-12 14:54:13 +00:00
Lee Robinson
9f1d5d7fca
Update dependencies of all CMS examples. (#27001) 2021-07-09 14:43:56 +02:00
Terry Tan
5e6b92059f
Fix (trailingSlash: true) causes issue in auth0 example (#27010)
I think the issue was due to ```nextjs-auth0``` package on version ```0.8.0```. Upgrading to latest version ```1.4.2``` resolve the issue.

## Bug

- [x] Related issues linked using `fixes` https://github.com/vercel/next.js/issues/19313
2021-07-08 15:54:21 +00:00
Paul Schultz
5b1c3e39e1
Updated next-transpile-modules to 8.0.0 (#26971)
## Bug

- [x] Related issues linked using `fixes #26970`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`
2021-07-06 20:14:45 +00:00
Angelo Ashmore
b4089998e6
Use Prismic CDN URL in cms-prismic example (#26837)
The CDN URL is the recommended URL for the Prismic REST and GraphQL APIs.

## Documentation / Examples

- [x] Make sure the linting passes
2021-07-02 21:03:21 +00:00
Artur Sedlukha
748b005cda
Fix using-preact example deps (#26821)
Fix after https://github.com/vercel/next.js/pull/26133
2021-07-01 20:20:20 +00:00
D. Kasi Pavan Kumar
b508d90449
examples: fix typo lunixlinux (#26796)
## Bug

- [ ] ~~Related issues linked using `fixes #number`~~
- [ ] ~~Integration tests added~~

## Feature

- [ ] ~~Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.~~
- [ ] ~~Related issues linked using `fixes #number`~~
- [ ] ~~Integration tests added~~
- [ ] ~~Documentation added~~
- [ ] ~~Telemetry added. In case of a feature if it's used or not.~~

## Documentation / Examples

- [x] Make sure the linting passes
2021-07-01 06:20:35 +00:00
Soham Shah
46a85b4e6f
update with-redux-toolkit-typescript (#26714)
## Bug

- [X] Related issues linked using `fixes #26713 `

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.

## Documentation / Examples

- [X] Make sure the linting passes

## Screenshots

After this small change the warning disappears.
![image](https://user-images.githubusercontent.com/47717492/123749377-fd56fb80-d8d2-11eb-8b70-dbb7f6f16050.png)
2021-06-29 14:52:03 +00:00
hiro
956bc2f387
Fix typo on "occured" to "occurred" (#26709)
* fix: typo occured -> occurred

* fix: typo occured -> occurred

* fix: typo occured -> occurred

* fix: typo occured -> occurred

* lint-fix


Co-authored-by: JJ Kasper <jj@jjsweb.site>
2021-06-28 23:02:20 -05:00
Lee Robinson
1dd6eeb598
Update layouts example to persist state across client-side transitions. (#26706)
* Update layouts example

* Update examples/layout-component/components/layout.js

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2021-06-28 22:19:15 -05:00
Vadorequest
6f42096233
Add link to live demo already hosted (#25718)
* Add link to live demo already hosted

To make it easier for people to simply see the live example without having to deploy a whole new project

* update link


Co-authored-by: JJ Kasper <jj@jjsweb.site>
2021-06-25 11:52:54 -05:00
John
bbedbb7203
fix with-loading example for next 11 (#26569)
## Documentation / Examples

- [X] Make sure the linting passes

This PR updates the with-loading example to follow the documentation of router events for next 11
2021-06-24 18:16:54 +00:00
Pranav P
0b79b6d73d
tailwind examps upgraded to v2.2 (#26549)
## Documentation / Examples

- [x] Make sure the linting passes
2021-06-24 12:05:17 +00:00
Lee Robinson
f6e5a816e2
[examples] Fix ssr-caching example. (#26540)
Closes https://github.com/vercel/next.js/issues/12019 with a better example of proper SSR caching.
2021-06-23 18:27:19 +00:00
Vitaly Baev
562640dbb4
(examples/with-webassembly) fixed for webpack 5 (#26440)
## Documentation / Examples

- [x] Make sure the linting passes

Fixes #26436

As mention in #25854 `with-webassembly` example doesn't work anymore after switching to webpack 5.
This PR adds webpack experimental configuration.
2021-06-21 16:45:16 +00:00
Lee Robinson
eac0374e45
Update with-eslint example. (#25817) 2021-06-20 16:16:34 -05:00
Shubhan Chemburkar
6fd207f5ce
Examples: Fixed the example path to correct value (#26255)
## Documentation / Examples

- [x] Make sure the linting passes

Changes in readme.md:

The path to the example in ```create-next-app``` command was incorrectly specified as ```api-routes``` by the example author. 
Fixed this value to ```api-routes-rate-limit``` as well as app name to ```api-routes-rate-limit-app``` make this consistent with other examples.

No other changes made to example.
2021-06-17 17:23:32 +00:00
Pavel Mineev
9785ba8eca
(examples/with-lingui): update example (#26076)
Fixes one of the items from #25854

## Documentation / Examples

- [x] Make sure the linting passes
- [x] Add the StackBlitz button
- [x] [Live demo](https://stackblitz.com/github/akellbl4/next.js/tree/examples/with-lingui-update/examples/with-lingui)
2021-06-17 16:29:58 +00:00
Levinson D'Souza
b3fad232bd
Updating Typescript to recommended minimum 4.3.2 (#26267)
## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.

## Documentation / Examples

- [ ] Make sure the linting passes
2021-06-17 14:33:32 +00:00
Rishabh Poddar
4132b80735
Update with-supertokens example (#26266)
This PR updates the `package.json` dependency for `with-supertokens` example to use the latest version of our library.
2021-06-17 14:20:31 +00:00
Tim
67aba8469e
Update postcss version in examples (#26226) 2021-06-17 10:37:17 +02:00
Pau Rodriguez Molina
58318a8545
Fix: upgrade react-test-renderer version to 17.0.2 (#26229)
npm i wasn't working because of outdated version of react-test-renderer.

## Bug

- [X] Related issues linked using `fixes #number`
- [ ] Integration tests added

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.

## Documentation / Examples

- [ X] Make sure the linting passes
2021-06-16 21:32:41 +00:00
arshad
3231c35354
Add cms-drupal example (#25198)
Adds cms-drupal example.

Demo: https://cms-drupal.vercel.app
2021-06-16 20:59:31 +00:00
Nick Babcock
5629223407
Update examples to use React 17 (#26133)
[With next 11 requiring react 17](https://nextjs.org/blog/next-11#upgrade-guide), most of the examples
need to be updated, so the following snippet updated all the examples to
a compatible react version.

```bash
cd examples/
fd -g 'package.json' | xargs sed -r -i 's/"react": ".*"/"react": "^17.0.2"/
fd -g 'package.json' | xargs sed -r -i 's/"react-dom": ".*"/"react-dom": "^17.0.2"/'

# exclude experimental react version
git checkout with-reason-relay/package.json
```
2021-06-16 16:43:26 +00:00