Skip to content

Commit

Permalink
Update Next.js example
Browse files Browse the repository at this point in the history
  • Loading branch information
steida committed Nov 29, 2023
1 parent fea7623 commit a442068
Show file tree
Hide file tree
Showing 12 changed files with 4,952 additions and 267 deletions.
3 changes: 3 additions & 0 deletions examples/nextjs/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "next/core-web-vitals"
}
36 changes: 36 additions & 0 deletions examples/nextjs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js
.yarn/install-state.gz

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# local env files
.env*.local

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts
11 changes: 9 additions & 2 deletions examples/nextjs/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
# [Next.js](https://nextjs.org/)
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).

## Getting Started

First, run the development server:

```bash
npm install
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
```

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
8 changes: 8 additions & 0 deletions examples/nextjs/app/globals.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
@tailwind base;
@tailwind components;
@tailwind utilities;

body {
max-width: 500px;
margin: auto;
}
15 changes: 8 additions & 7 deletions examples/nextjs/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
export default function RootLayout({ children }): JSX.Element {
import "./globals.css";

export default function RootLayout({
children,
}: {
children: React.ReactNode;
}) {
return (
<html lang="en">
<body
// https://twitter.com/evoluhq/status/1660763010657402881
suppressHydrationWarning
>
{children}
</body>
<body suppressHydrationWarning>{children}</body>
</html>
);
}
Loading

0 comments on commit a442068

Please sign in to comment.