Skip to content

Commit 361a508

Browse files
committed
Upgraded Next.js to 12.2
1 parent b6a96cb commit 361a508

14 files changed

+2324
-2787
lines changed

Procfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
web: rails server
22
worker: bundle exec good_job start
3-
ui: cd frontend && npm run dev
3+
ui: cd frontend && pnpm run dev

frontend/.eslintrc.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "next/core-web-vitals"
3+
}

frontend/.gitignore

+2-4
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,11 @@ yarn-error.log*
2626
.pnpm-debug.log*
2727

2828
# local env files
29-
.env.local
30-
.env.development.local
31-
.env.test.local
32-
.env.production.local
29+
.env*.local
3330

3431
# vercel
3532
.vercel
3633

3734
# typescript
3835
*.tsbuildinfo
36+
next-env.d.ts

frontend/.npmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
auto-install-peers=true

frontend/.nvmrc

-1
This file was deleted.

frontend/README.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@ This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next
55
First, run the development server:
66

77
```bash
8-
npm run dev
8+
pnpm install && pnpm run dev
99
# or
10-
yarn dev
10+
npm install && npm run dev
11+
# or
12+
yarn install && yarn dev
1113
```
1214

1315
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.

frontend/components/Header.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export default function Header() {
99
const { nextRailsUser: user, addUser } = useUser();
1010
const [showMenu, setShowMenu] = useState(false);
1111
const toggleMenu = () => setShowMenu(!showMenu);
12-
const [cookies, setCookie, removeCookie] = useCookies(['nextRailsUser']);
12+
const [_cookies, _setCookie, removeCookie] = useCookies(['nextRailsUser']);
1313

1414
const signOut = () => {
1515
removeCookie('nextRailsUser');

frontend/next.config.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/** @type {import('next').NextConfig} */
22
const nextConfig = {
33
reactStrictMode: true,
4-
}
4+
swcMinify: true,
5+
};
56

6-
module.exports = nextConfig
7+
module.exports = nextConfig;

0 commit comments

Comments
 (0)