Steven
4466ba436b
chore(examples): use default prettier for examples/templates ( #60530 )
...
## Description
This PR ensures that the default prettier config is used for examples
and templates.
This config is compatible with `prettier@3` as well (upgrading prettier
is bigger change that can be a future PR).
## Changes
- Updated `.prettierrc.json` in root with `"trailingComma": "es5"` (will
be needed upgrading to prettier@3)
- Added `examples/.prettierrc.json` with default config (this will
change every example)
- Added `packages/create-next-app/templates/.prettierrc.json` with
default config (this will change every template)
## Related
- Fixes #54402
- Closes #54409
2024-01-11 16:01:44 -07:00
ChanHui
8d45aa9bfb
update @types/react version in examples ( #57259 )
...
### What?
When I ran `npx create-next-app --example with-turbopack` and installed
dependencies using `yarn`, I found an typescript error(`'SomeComponent'
cannot be used as a JSX component.`).
<img
src="https://github.com/vercel/next.js/assets/51700274/f6c7e478-c0b1-4ea2-996f-4c0c78e3bb4b "
width=400 />
and I realized that the bug is due to the version of
@types/react(18.0.x).
you can check this issue on
[here](https://github.com/vercel/next.js/issues/42292#issuecomment-1594351684 )
too.
### Why?
It seems that there is an error occurring in the @types/react version
18.0.x.
### How?
It would be good to change the @types/react version to 18.2.8 in the
next.js examples.
I think this change will resolve [this
issue](https://github.com/vercel/next.js/issues/55080#issue-1884846177 )
[NestJS
documentation](https://nextjs.org/docs/app/building-your-application/configuring/typescript#async-server-component-typescript-error )
also states to upgrade the version.
Co-authored-by: Lee Robinson <me@leerob.io>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-10-26 19:52:08 -05:00
JTaylor0196
f7baa56792
update example Deploy button URLs ( #48842 )
...
### What?
Updates Deploy button URLs for all listed examples here:
https://github.com/vercel/next.js/tree/canary/examples
### Why?
The Deploy URLs are currently broken and result in a failed clone
attempt on Vercel.
### How?
The URLs have been changed from https://vercel.com/new/git/external ?… to
-> https://vercel.com/new/clone ?…
(Last updated
[here](8eaabe2fb0
)
in 2021)
2023-04-26 13:31:44 -04:00
Alexis Rico
a45bf8c93b
Fix deploy button in with-xata example ( #43608 )
...
The deploy button of the `with-xata` example is not working properly
because we were lacking the integration to configure the env variables.
[![Deploy with
Vercel](https://vercel.com/button )](https://vercel.com/new/git/external?repository-url=https://github.com/SferaDev/nextjs-demo/tree/fix-with-xata-deploy/examples/with-xata&project-name=with-xata&repository-name=with-xata&integration-ids=oac_IDpMECDuYqBvAtu3wXXMQe0J )
Taking advantage of the PR, some other changes:
- Adding `alt` to `next/image` to fix build with latest version
- Update readme to add more information in the Xata CLI section
- Use a new command to initialize the database schema on first
deployment
- Remove hardcoded URL in `xata.codegen.ts`
- Remove deprecated `formatVersion` in `schema.template.json`
- Update dependencies
Note: The integration is still work in progress, it works for the
`Deploy to Vercel` button but we want to improve the UI/UX before
submitting it to the Marketplace, keeping it unlisted for a while.
2022-12-01 11:34:23 -08:00
Jamie Barton
9863df3fb2
chore(examples): use correct name in with-xata
example ( #41063 )
...
## 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/examples/adding-examples.md )
This PR fixes the npm/pnpm/yarn commands to use with-xata instead of Contentful.
2022-09-30 14:27:47 +00:00
Atila Fassina
2fa33b351b
Add with-xata
example ( #39864 )
...
This Pull Request adds a `with-xata` example to use [Xata](https://xata.io ) as the data layer of a Next.js app.
## 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 )
Co-authored-by: Balázs Orbán <18369201+balazsorban44@users.noreply.github.com>
2022-09-29 22:37:28 +00:00