* Update with-storybook example
* Delete with-storybook-typescript example
* Add TypeScript section to the README
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
r? @lfades @timothyis
cc @kiwicopple @awalias
Adding a realtime chat example showing how to implement authentication and realtime data syncing with supabase.io :)
In with-sentry add stripPrefix of `webpack://_N_E/`. This removes the `webpack://_N_E/` prefix from the stack trace which will help Sentry to understand what is "App Only" vs "Full"
I'll fully tested calling errors in browser and the stack traces are still aligned and linked correctly. This just gets rid of the extra data in the front which seems to be the same for everyone and I believe it comes from webpack 5 (?)
Reference to discussion https://github.com/vercel/next.js/discussions/16010
Bug fixes to `with-firebase-authentication` example that enter in a loop `maximum update depth exceeded errors` becase of the `onIdTokenChanged` Firebase auth method.
I added a clean up event listener.
The link used to appear twice in the README, but it has only been removed once (#15267) to fix#15219. This commit removes the other link to the broken demo.
updated example for [active-class-name](f00ad581a1/examples/active-class-name) to also support a `[slug].js` page that matches on `as` instead of `href` (as `href` would be `/[slug]`)
> This does not demo `[..slug].js` as this requires possible custom code for determining the slug path part for the active classname. i.e. page tree active nodes. A possible other example or another PR on this example.
Has possible information for:
* https://github.com/vercel/next.js/issues/7410
I noticed a problem with the example - when you leave it logged in for more than an hour it breaks. The example API call starts to fail with `auth/id-token-expired`.
Looking at the code I saw that we never update the id token after signing in, but firebase automatically updates it every hour, meaning our `verifyIdToken` fails after an hour.
So I used the `onIdTokenChanged` function from firebase to update the cookie every time the id token changes.
I'm open to suggestions on refactoring the code I've added.
## Motivation
As Graphcool is being shutdown, we replaced all the graphcool api endpoints with some handcrafted APIs using Prisma & Nexus, that can be found here https://github.com/prisma-labs/nextjs-graphql-api-examples. These GraphQL endpoints are now deployed to Vercel.
## Notes
- I couldn't get the reason-relay example to run. Given that the relay endpoint works on the other relay example, I don't see any reason why it wouldn't work on that one
- The `with-apollo` example is buggy when creating some posts, but nothing related to the switch of the api endpoint as it was already buggy before. I suspect the `concatPagination` strategy to be the cause of that bug, but I couldn't figure it out.
Fixes#14780
Remove the dotenv dependency from all examples (in favor of environment support): #15225
All variables are exposed to the client. This Example does not use firebase-admin.
I was referencing the with-passport example and found a minor syntax error:\
The login and signup page both used `event.preventDefault()` on the submit handlers, whereby the correct reference to the event is `e` as defined within the `handleSubmit` functions.
Additionally used the chance to bump npm packages, the largest bump being swr to the latest version: 0.3.0
### Summary of all Changes made:
* Fixed syntax error on login page
* Fixed syntax error on signup page
* Bumped cookie to 0.4.1
* Bumped next-connect to 0.8.1
* Bumped swr to 0.3.0
## What
The current `gh-pages` example has issue when deploying.
This is how the error looks like:
![image](https://user-images.githubusercontent.com/1008093/88996697-827f0c80-d320-11ea-93bd-48141c321a65.png)
```
...
Export successful
The following paths are ignored by one of your .gitignore files:
out
hint: Use -f if you really want to add them.
hint: Turn this message off by running
hint: "git config advice.addIgnoredFile false"
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! next@1.0.0 deploy: `rm -rf node_modules/.cache && next build && next export && touch out/.nojekyll && git add out/`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the next@1.0.0 deploy script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
...
```
It's because `out` folder is added on `.gitignore` and the deploy script runs `git add out/`.
The fix is to remove `out` folder from `.gitignore`.
## How was it tested
run `npm run deploy`, it should be completed successfully.
Fixes https://github.com/vercel/next.js/issues/15595
- Updated the tailwindcss and tailwindcss-emotion examples to the latest version of tailwindcss
- Added a new `with-styled-jsx` example
- Updated the `basic-css` example to use CSS Modules instead of styled-jsx
- Added the examples to the documentation page for built-in css support