Commit graph

1499 commits

Author SHA1 Message Date
TodorTotev
8618ab85ad
More redundant imports @ examples (#13190)
Again, related to [12964](https://github.com/zeit/next.js/issues/12964)

After checking all the other examples and the ongoing pull requests, I believe that with this PR being merged, all the examples should be free of redundant react imports.
Let me know if you want me to edit anything that you don't like.

Regards

with-typescript
with-atstroturf
with-atlaskit
with-styletron
with-styled-components-rtl
with-stylesheet
with-stomp
with-stitches-styled
with-stitches
with-slate
with-sentry-simple
with-sentry
with-segment-analytics
with-rematch
with-relay-modern
with-reflux
with-redux-wrapper
with-react-relay-network
with-react-native
with-react-multi-carousel
with-react-jss
with-react-helmet
with-react-ga
with-quill-js
with-prefetching
with-google-analytics-amp
with-google-analytics
with-framer-motion
with-flow
with-firebase-hosting
with-firebase-cloud-messaging
with-firebase-authentication
with-expo
with-dynamic-app-layout
with-draft-js
with-cxs
with-cerebral
with-ant-design-mobile
with-algolia-react-instantsearch
using-preact
progressive-render
2020-05-22 15:33:04 +00:00
Tim Neutkens
e4d22cec63 Fix formatting of older PR that passed tests 2020-05-22 14:36:01 +02:00
Arnar Kári Ágústsson
6ac2f4b74d
With reason relay example (#12080)
* Add with-reason-relay example

* update gitignore

* Add missing components

* Add _app.js wrapper

* Move records to wait for results

* Update readme

* Upload schema

* Add call to query hook to get viewerData with getFragmentRefs

* Move relay env setup to seperate module

* remove unused code

* lint fixes

* prettier fix
2020-05-22 12:13:44 +02:00
Tim Neutkens
b91e570a33
Move csp examples (#13221)
Fixes #12042
2020-05-22 11:35:27 +02:00
TodorTotev
7cf3c3d28d
Feat/remove redundant imports from examples (#13062)
The issue is related to [12964](https://github.com/zeit/next.js/issues/12964)

Let me know if there are any changes you want me to make.

Affected examples:

**with-glamor
with-graphql-hooks
with-graphql-react
with-grommet
with-http2
with-jest
with-cookie-auth-fauna
with-context-api
with-cerebral
with-aphrodite
with-apollo-and-redux
basic-css
with-carbon-components
amp-first**

I would love to help more, so let me know if there is anything specific I can contribute to.
2020-05-20 17:50:03 +00:00
Piotr Kuczynski
e28ce34ccb
Fix the link for Custom Server documentation (#13137) 2020-05-20 16:50:06 +02:00
Kirill Konshin
b8284d9a86
Upgrade Next Redux Wrapper to version 6 in examples (#11802)
Fixes https://github.com/zeit/next.js/issues/12920
2020-05-20 12:22:10 +00:00
Christian Alfoni
cc9e2526e4
With stitches (#12677)
split into two examples
2020-05-20 06:22:50 +00:00
jmgr2996
993b78de0b
chore: Remove some redundant imports (#13066)
This issue is related to [12694](https://github.com/zeit/next.js/issues/12964). I covered the following examples


- with-zeit-fetch
- with-yarn-workspaces
- with-why-did-your-render
- with-video-js
- with-universal-configuration-runtime
- with-typestyle
- with-three-js

If you have a suggestion or change I'd appreciate it
2020-05-20 05:23:16 +00:00
Michael Albertz
99ee63e110
[Examples] Fix with-yarn-workspaces Vercel deploy button (#12867)
Fixes: https://github.com/zeit/next.js/issues/10734
Related: https://github.com/zeit/now/discussions/4320

This fixes the **Deploy your own** button for the with-yarn-workspaces example. Currently the deployment fails with the following error.

```
Module not found: Can't resolve 'bar' in '/zeit/3ad1f9cd/pages'
```

I also added a dynamic api route to the example, because I had problems configuring vercel to redirect to dynamic routes.

This will be the new Vercel-Import-From link: [Deploy](https://vercel.com/import/project?template=https://github.com/Prioe/next.js/tree/fix-with-yarn-workspaces-deploy/examples/with-yarn-workspaces)
2020-05-20 04:39:38 +00:00
taye
53b478ccd7
example(contentful): set up content types with required fields (#12591)
The example app expects all fields of Post and Author entries to be present and fails to build if any are missing. This PR adds a "required" validation to fields of both content types to avoid bulid errors.

CC @stefanjudis
2020-05-20 04:23:28 +00:00
Luis Alvarez D
a1b46817eb
[Examples] Update with-sentry-simple (#13074)
Moved from `getInitialProps` to the new data fetching methods. Updated the readme and simplified the implementation for pages.
2020-05-20 02:57:07 +00:00
Greg Rickaby
58c7265ba0
Update DatoCMS Example (#13008)
👋🏻 This PR updates the Datocms example:

- [x] Next.js 9.4 absolute import and aliases support
- [x] Next.js 9.4 native `.env` support
- [x] Tailwind 1.4 native PurgeCSS support
- [x] Chore: bump other dependencies, like React, Remark, and DateFNS 

I've tested this PR here: 

- 💻 https://github.com/gregrickaby/datocms-next-js-blog-demo-2392
- 👀 https://datocms-next-js-blog-demo-2392.now.sh/
2020-05-19 23:13:35 +00:00
Jimmy Chion
f61a2e7a45
[Example] Unsubscribe Router.on.events (#13102) 2020-05-19 12:37:54 -04:00
Tommy Ljungberg
a44ab5d0c1
fix(examples): align with-absolute-imports with next 9.4 (#13090) 2020-05-19 18:11:33 +02:00
Jaime Leonardo Suncin Cruz
d16fb63c1b
Improve Redux Toolkit example (#12858) 2020-05-19 09:27:30 -04:00
TodorTotev
fd55ef9aaf
Remove redundant code from with-portals-ssr example (#13060)
* removed redundant imports and replaced the fragment with the shorthand syntax

* Brought back the component import

Co-authored-by: Joe Haddad <joe.haddad@zeit.co>
2020-05-19 11:16:24 +02:00
Joe Haddad
dbad9db68c
Update Examples for Fast Refresh (#13068) 2020-05-18 17:44:18 -04:00
Joe Haddad
86160a5190
Upgrade to Prettier 2 (#13061) 2020-05-18 15:24:37 -04:00
TodorTotev
7c68d0c7f6
Removed redundant code from the with-portals example (#13059) 2020-05-18 14:17:02 -04:00
Elliot Hesp
5610af012a
Add monaco-editor example (#11232) 2020-05-18 13:21:13 -04:00
Guilherme de Andrade
c334a2751e
chore: use function component on with-typescript example (#12695) 2020-05-18 13:13:01 -04:00
Byron Polley
0b7ebc69fe
docs: add prismic locale note (#12862) 2020-05-18 13:10:32 -04:00
Tom Evans
6802805010
[Examples] Added public folder to with-docker example (#12879) 2020-05-18 13:08:28 -04:00
Lukas Böcker
36ddadae3a
Fix with-emotion examples (#13005) 2020-05-18 13:07:07 -04:00
jmgr2996
dd264f582f
chore: Remove redundant imports in several examples (#13030) 2020-05-18 13:02:23 -04:00
Nikolay
5cdb408ec8
[Examples] Chakra UI - Move CSSReset inside ColorModeProvider (#13044) 2020-05-18 12:03:38 -04:00
jmgr2996
fedc662f25
feat: Remove redundant imports in XState example (#13020) 2020-05-17 17:52:00 -04:00
none23
de516957b2
Remove unused babel-preset-react dep from babel-macros example (#12990) 2020-05-16 17:52:11 -04:00
Willian Justen
18dc1f66c6 Remove isomorphic-unfetch from examples (#12948)
Since 9.4 release, fetch is pollyfilled by default from #12353,
so the import is not needed anymore.
2020-05-15 22:23:55 +02:00
Henrik Wenz
b280c82a5e
[Examples] Fix active-class-name (#12931) 2020-05-15 12:44:46 -04:00
Bruno Crosier
f840e1fe68
Stop tracking changes in .next folder (#12924)
The .next folder doesn't need to be tracked
2020-05-15 10:07:14 -05:00
Evan Bacon
33800de9f8
add Expo example (#12805)
* Created Expo example project

* Update examples/with-expo/README.md

* Updated usage guide

* Update README.md

* Lint fix

Co-authored-by: Luis Alvarez <luis@vercel.com>
2020-05-14 18:33:45 -05:00
Raphael Chaula
5fdf3b8a46
Update package.json (#12865)
Without babel-core, "lingui extract" gives TypeError: Api.call... function is undefined
2020-05-14 21:07:13 +02:00
Dylan Jhaveri
aef282ffac
Add example with-hls-js (#12723)
* npm init next-app

* add example video-player component with HLS.js

* add README for example with HLS.js

* update name in package.json

* Update examples/with-hls-js/.gitignore

Co-authored-by: Luis Alvarez D. <luis@vercel.com>

* Update license to MIT

Co-authored-by: Luis Alvarez D. <luis@vercel.com>

* Update next version to latest

Co-authored-by: Luis Alvarez D. <luis@vercel.com>

* remove unused pages/api

Co-authored-by: Luis Alvarez D. <luis@vercel.com>
2020-05-13 21:47:28 -05:00
Joe Haddad
b41f9baaa4
Fix up CMS examples (#12840) 2020-05-13 14:13:14 -04:00
João Pedro Schmitz
5d201dce9b
docs(ssr-caching): remove link to react-esi example (#12789) 2020-05-13 01:58:15 -04:00
Timothy
9cb75d556d
Add contentful as a related example link to each CMS example (#12796) 2020-05-12 14:15:53 -05:00
Tomas Dabašinskas
c0edf06d8f
sort posts by date in descending order (#12303)
* sort posts by date in descending order

Hi, I'm extending getAllPosts function to sort posts array by date in descending order. 
Any feedback is appreciated

* sort posts by date timestamp in descending order

* Lint fix

Co-authored-by: Luis Alvarez <luis@vercel.com>
2020-05-12 12:40:51 -05:00
dpyzo0o
29b110009a
fix logout in with-iron-session example (#12704) 2020-05-11 08:54:50 -04:00
Luis Alvarez D
f0220e6a9d
[Examples] Update firebase authentication (#12687) 2020-05-10 21:32:20 -04:00
Shu Uesugi
cc139b8d89
More renaming ZEIT → Vercel (#12649) 2020-05-09 17:21:53 +02:00
Luis Alvarez D
5d70b2a06f
[Examples] Update data-fetch example (#12617) 2020-05-08 11:53:47 -04:00
liwenzhi
4a8b896122
[Examples]: With react bootstrap (#12421)
* add new example with-react-bootstrap

* use vanilla react-bootstrap components to implement index page

* clear unnecessary comments

* remove private property in package.json

* Updates

Co-authored-by: Luis Alvarez <luis@vercel.com>
2020-05-07 17:13:59 -05:00
Ty Mick
a7b0e8a786
Fix DatePicker Day.js bug in Ant Design example (#12580)
* Fix DatePicker Day.js bug in Ant Design example

* Lint fix

Co-authored-by: Luis Alvarez <luis@vercel.com>
2020-05-07 16:29:42 -05:00
Juan Silupu Maza
63bfbfff54
Add cross-env package (#12581)
* add notes

* add cross-env package, for stability in different SO

* fix: move cross-env package from Dependencies at devDependicies
2020-05-07 11:16:36 +02:00
Max Schmitt
71a5b5803e
example: added Ant Design Pro Layout less (#12408) 2020-05-06 18:00:48 -05:00
AlexanderVishnevsky
960368eed5
Resolve bug with Prismic Locales (#12132)
* Resolve bug with Prismic Locales

add configuration for not default locale

* Resolve bug with Prismic Locales

Add configuration for Prismic locale.
More information about bug:

* Fixes and removed unrequired changes

Co-authored-by: Luis Alvarez <luis@zeit.co>
2020-05-06 13:30:23 -05:00
Jiachi
1fdadbb18b
fix: hello world missing default exports (#12551) 2020-05-06 11:33:41 +02:00
Matthias Lorthiois
c81cabeae8
Update blog-starter to use Tailwind CSS v1.4's new built-in purge option (#12452) 2020-05-06 11:27:21 +02:00
Amandeep Singh
1aa2e0cfe6
Fixed typo (#12497) 2020-05-05 00:06:55 -04:00
Soichi Takamura
790800305b
[examples/with-typescript-graphql] Add "createResolverContext" hook, etc. (#11681)
* Update deps

* Run "node-check-update -u"
* "graphql" keeps ^14 since other libs expect it
* Install apollo-link and apollo-cache because @apollo/react-common
wants it as peer-deps

* Add graphql-let/schema/loader

* This enables HMR from modifying *.graphqls.

* Add resolver context

* Remove JSDoc, respect TypeScript defs

* ncu -u

* Keep using graphql@^14.6.0 for the other deps

* fix: Migrate to graphql-let@0.10.0

* Removed duplicated deps

* Updated check

Co-authored-by: Luis Alvarez <luis@zeit.co>
2020-05-04 17:09:39 -05:00
Taylor Bryant
5e80999c04
Clean up styles in with-tailwindcss example (#12458) 2020-05-03 19:45:57 -04:00
Vincent Voyer
f38eb70207
docs(examples): with-iron-session update (#12418) 2020-05-02 23:18:23 -04:00
Taylor Bryant
96f8455a03
Add names to components in amp example (#12415) 2020-05-02 15:09:21 -04:00
Taylor Bryant
f13ca3055c
Add names to components in hello-world example (#12416) 2020-05-02 15:08:56 -04:00
Taylor Bryant
a59a15dd78
Add name to component in with-tailwindcss example (#12417) 2020-05-02 15:08:23 -04:00
Marko Djordjevic
a2b9f2484c
Fix 'user undefined' error with ssr profile in auth0 example (#11934) 2020-05-02 01:25:34 -04:00
Joe McCann
2e0f52acba
upgrade from deprecated url.parse() since Node 11 (#11825)
Co-Authored-By: Tim Neutkens <tim@timneutkens.nl>
2020-05-02 01:24:58 -04:00
Jon Espen Kvisler
b516c4ea23
Transpile packages in react-intl example (#11849) 2020-05-02 01:22:25 -04:00
Ronie
a7bd2db963
Example: update netlify-cms to use SSG (#12072) 2020-05-02 01:18:04 -04:00
David Sally
945c1fac9f
Update with-emotion-11 example to use functional _app component (#12183) 2020-05-02 01:15:02 -04:00
Connor Mcgarty-Wood
daa7f821a9
Docs: Add req.body to custom express server example (#12211) 2020-05-02 01:14:04 -04:00
Marcus Koh
6a8aef71fe
Updated with-firebase-authentication to fix errors (#12204) 2020-05-02 01:13:08 -04:00
lncls
ae1857ef33
#12314 add auth to with-sentry-simple example (#12316) 2020-05-02 01:07:31 -04:00
Robin Weser
b5b8cd8642
[example-with-fela] CSS imports compatibility (#12237) 2020-05-02 01:04:42 -04:00
mit123suki
2dcd4e9509
example: antd-4 with built-in css support (#11837) 2020-05-02 00:59:56 -04:00
Hossam Magdy
e19023d672
Update with-firebase-hosting[-and-typescript] examples (#11685) 2020-05-02 00:56:40 -04:00
Stefan Judis
98233b914e
[Examples] Improve Contentful example starter and docs (#12351) 2020-05-02 00:52:39 -04:00
dalibor-123
5808221f0d
gitignore graphql-let generated .d.ts files (#12381) 2020-05-02 00:48:28 -04:00
Christian Alfoni
a6791abf9c
example: new with-stitches (#11924) 2020-05-02 00:30:39 -04:00
Luis Alvarez D
82596124c6
Add cors example and update API routes docs (#12390) 2020-05-02 00:06:23 -04:00
Vincent Voyer
9590a8a977
docs(examples): upgrade next-iron-session to v4 (#12398) 2020-05-02 00:04:03 -04:00
Amandeep Singh
6dc28cff6d
Rectified typo (#12366) 2020-05-01 10:52:07 +02:00
Joe Haddad
fbea795ad9
[Fast Refresh] Redesigned Runtime Error Experience (#12222) 2020-04-30 10:50:25 -04:00
Taylor Bryant
0050432690
Update with-tailwindcss to use Tailwind CSS v1.4.0's new built-in purge option (#12327) 2020-04-30 09:51:37 +02:00
Aemiro Allison
c1aeaa482b
Fix typo (#12224) 2020-04-29 15:08:33 -05:00
Luis Alvarez D
1a7a14e5e2
[Examples] add Contentful example (#12323)
* Added example

* Readme fixes

* Preview mode fix

* Added rich test post content

* Added demo

* Apply suggestions from code review

* Update examples/cms-contentful/README.md

* Apply suggestions from code review

* Apply suggestions from code review

* Now → Vercel

Co-authored-by: Shu Uesugi <shu@chibicode.com>
2020-04-29 13:19:49 -05:00
Tim Neutkens
5d8968f64a
Remove launched experimental options (#12197) 2020-04-25 21:00:41 +02:00
Arthur Petrie
e97cf15d58
[Example] update with-tailwindcss-emotion to tailwind 1.3.3 and emotion 11 + tailwind-ui plugin (#11611)
* [Example] update to tailwind 1.2.0 and emotion 11

* fix lint error

* Used different ways to style components

* update @tailwindcssinjs/macro package
remove clear cache script
update component comments

* update tailwindcss package to 1.3.3

* update dependencies

* update dependencies

* Updated readme, package.json, and removed unrequired imports

Co-authored-by: Luis Alvarez <luis@zeit.co>
2020-04-24 18:27:43 -05:00
Johan Nilsson
f3e6545bf5
Remove unnecessary export to make usage clearer. (#12167)
The method initializeStore is only being used locally by useStore.
By having this exported I initially thought the consumer would have to call this as setup globally and then call useStore as well for each consuming component.

Downloading the sample I saw it's only useStore that is being used by the consuming app and this could be made clear by not exporting initializeStore.
2020-04-24 11:31:03 +02:00
Aleksander
f42055ccb0
Update snapshot in with-jest example (#12157) 2020-04-24 11:21:48 +02:00
Shania
c601c9413d
Added a link to the next.config.js docs for the with-env-next-… (#12153) 2020-04-24 11:20:13 +02:00
Allen Hai
0c6ee2c760
Add userbase example (#12150)
* add userbase example

* update readme and add now.json with build.env

* update deploy button import path for testing

* update readme

* update readme with canary tree path for deploy button

* remove prepopulated test username + password

* Apply lint-fix

* add deployed demo link

* remove merge conflict arrows

* fix lint errors

* run yarn lint-fix

* add .env.example and update readme with config steps

* add dotenv and update next.config.js

Co-authored-by: Matthew Sweeney <mail@msweeneydev.com>
Co-authored-by: JJ Kasper <jj@jjsweb.site>
2020-04-23 19:56:42 -05:00
Sean Li
91adb8661d
Add example with Magic authentication (#11810)
* Add example with Magic and Passport.js

* Tweaked wording on README

* Fixed lint error

* Fixed prettier error

* Update examples/magic/README.md

Removed Download manually section from README

Co-Authored-By: Joe Haddad <timer150@gmail.com>

* Removed dependency on passport and express + cleanup

* Changed ZEIT brand to Vercel

* Updated readme instructions and secrets

* Renamed example

* Changed db comment

Co-authored-by: Joe Haddad <timer150@gmail.com>
Co-authored-by: Luis Alvarez <luis@zeit.co>
2020-04-22 18:15:12 -05:00
Oxicode
7d2ff81207
fix variable (#12114) 2020-04-22 20:32:41 +02:00
Vania Kucher
39d9476992
Avoid bugs with native Date class (#12098) 2020-04-22 11:43:07 +02:00
dzigg
06f379ffad
Fix typo in example (#12094)
Line 4: "...special configuration file `next.js.config` and..."
Is it meant to be `next.config.js`?
2020-04-22 01:19:53 -04:00
Dustin Deus
d28ad8805a
Rosetta i18n example (#11841)
* add rosetta example

* add comment

* add example for ssr

* add debug example, rerender when i18n keys are added

* output active locale, fix interpolation, fix cases for SSR and CSR

* add useful comments

* address pr issues

* update name in readme

* improve wording

* rename folder

* fix prop typo, add redirects

* load specific i18n json file in getStatisProps
Dashboard dont use any ssr technique

* use ext

* improve example

* Updated example

Co-authored-by: Luis Alvarez <luis@zeit.co>
2020-04-21 12:49:18 -05:00
Joe Haddad
3fe4cbc677
Add Experimental React Refresh Example (#12081)
* Add Experimental React Refresh Example

* add basic readme
2020-04-21 12:28:09 -04:00
David Pike
600b78c098
fix postcss.config.js warnings (#12070)
* update postcss.config.js to fix warnings

Return empty array if the condition is not met to avoid a null/undefined PostCSS plugin.

Related PR: https://github.com/zeit/next.js/pull/11366

* style: correct linting error
2020-04-21 14:51:16 +02:00
Tim Neutkens
483bd3ddda
Rename ZEIT to Vercel (#12075)
* Find/replace

* Update more URLs

* More rename

* Fix remaining examples

* More updates

* Update create-next-app

* Update remaining text

* Update

Co-authored-by: Shu Uesugi <shu@chibicode.com>
2020-04-21 11:47:12 +02:00
James Mosier
dc4e5695aa
(examples) Fix link in with-passport example README (#12056)
* Fix incorrect link in with-passport example

Closes #11961

* hardcode link for with-passport README

* fix link

Co-Authored-By: Luis Alvarez D. <luis@zeit.co>

Co-authored-by: Luis Alvarez D. <luis@zeit.co>
2020-04-20 20:28:12 +02:00
退之
5592e64c36
Fix with mobx (#11907)
* fix: with-mobx

* refactor: up link

* refactor: npm run prettier-fix

* refactor: server side render

* Updated store implementation and pages

* Updated readme

Co-authored-by: wangcheng <wangcheng@deepblueai.com>
Co-authored-by: Luis Alvarez <luis@zeit.co>
2020-04-20 13:05:10 -05:00
coktopus
a6beed01eb
bug: error when using transition property in tailwindcss + emo… (#12027) 2020-04-20 11:12:13 +02:00
Rounak Agarwal
2c0ed5e80c
[Examples] Update draft-js to v0.11.5 and add editorKey prop i… (#12011) 2020-04-20 11:05:09 +02:00
Francisco Pizarro
4b3967fa10
examples/with-react-helmet: upgrade react-helmet to v6.0.0 (#12000) 2020-04-18 13:09:10 -05:00
Justin
fe686b30b4
with-iron-session: fix link to next-iron-session (#11974) 2020-04-17 17:18:50 -05:00
Luis Alvarez D
42a328f3e4
Improved steps for examples/cms-prismic (#11935)
Co-authored-by: JJ Kasper <jj@jjsweb.site>
2020-04-16 09:15:43 -05:00
Vincent Voyer
90ffdcc33b
docs(auth): add with-iron-session to the alternatives list (#11903)
Following https://github.com/zeit/next.js/pull/11865#issuecomment-613663718
2020-04-15 02:01:40 -04:00