Commit graph

5 commits

Author SHA1 Message Date
Henrik Wenz
64a3697d05
[Docs] Update examples to favour functional _document (#39871)
## Changes

- Migrate class based `_document`s to functional documents 
- Removed `_document.js` where default
- Removed `MyDocument.getInitialProps` where default

## Motivation

This removes some boilerplate and prepares examples for server components.

## Documentation / Examples

- [x] Make sure the linting passes by running `pnpm lint`
- [x] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
2022-08-23 18:52:31 +00:00
JJ Kasper
0ab6ad5241
Update default gitignore templates (#39051) 2022-07-26 20:08:40 -05:00
eminvergil
0e6c63f26a
add user check in auth-with-stytch. (#38648)
* add user check in `auth-with-stytch`.

* Revert "delete auto.js in pollyfills"

* lint-fix

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2022-07-15 12:02:18 -05:00
Aleksa Cukovic
bcd8de3262
Add *.tsbuildinfo to .gitignore of examples that use typescript (#38005)
I added ` *.tsbuildinfo` to gitignores of examples that use typescript and don't already have it. By use typescript I mean have `tsconfig` somewhere in their directory tree. 

I used the following script to update the files:

```bash
#!/bin/bash

set -eou pipefail

cd examples
examples=`git ls-files . | grep tsconfig | xargs dirname | grep -v "/"`

for example in $examples; do
    if ! grep -q tsbuildinfo $example/.gitignore; then
        gitignore="$example/.gitignore"
        echo $gitignore
        tail -c1 $gitignore | read -r _ || echo >> $gitignore
        echo -e "\n# typescript\n*.tsbuildinfo" >> $gitignore
    fi
done
```
2022-06-26 11:17:44 +00:00
Chris
ff573632af
Add authentication example using Stytch (#32194)
## Documentation / Examples

This PR adds an example Next.js app that uses [Stytch](https://stytch.com/) for authentication, deployed on Vercel.
2021-12-22 19:30:44 +00:00