Skip to content

Commit dc81a10

Browse files
authored
Merge pull request #319 from CodeForAfrica/fix/upgrade_nextjs
Upgrade Nextjs
2 parents 48addb0 + f8fd5ce commit dc81a10

File tree

5 files changed

+513
-225
lines changed

5 files changed

+513
-225
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
- name: Setup Node.js
2828
uses: actions/setup-node@v2
2929
with:
30-
node-version: "16"
30+
node-version: "18"
3131

3232
- name: Check if version is bumped
3333
id: version-check

next.config.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
module.exports = {
2-
experimental: {
3-
outputStandalone: true,
4-
},
52
images: {
63
domains: process.env.NEXT_PUBLIC_IMAGE_DOMAINS?.split(",")
74
?.map((d) => d.trim())

package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,16 @@
3030
"@material-ui/core": "^4.12.4",
3131
"@svgr/webpack": "^6.2.1",
3232
"clsx": "^1.1.1",
33-
"next": "^12.1.0",
33+
"next": "^13.4.19",
3434
"next-seo": "^6.1.0",
3535
"papaparse": "^5.3.1",
3636
"prop-types": "^15.7.2",
37-
"react": "^17.0.1",
38-
"react-dom": "^17.0.1",
37+
"react": "^18.2.0",
38+
"react-dom": "^18.2.0",
3939
"react-feather": "^2.0.8",
4040
"react-select": "^5.2.2",
4141
"react-share": "^4.3.1",
42+
"sharp": "^0.32.5",
4243
"victory": "^36.2.1",
4344
"webpack": "^5.88.2"
4445
},
@@ -51,7 +52,7 @@
5152
"babel-plugin-transform-imports": "^2.0.0",
5253
"eslint": "^8.46.0",
5354
"eslint-config-airbnb": "^19.0.4",
54-
"eslint-config-next": "^12.1.0",
55+
"eslint-config-next": "^13.4.19",
5556
"eslint-config-prettier": "^9.0.0",
5657
"eslint-import-resolver-babel-module": "^5.3.2",
5758
"eslint-plugin-import": "^2.28.1",

src/components/Link/NextComposed.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,17 @@ const NextComposed = React.forwardRef(function NextComposed(props, ref) {
1818
const Component = component || "a";
1919
return (
2020
<NextLink
21-
href={href}
2221
as={as}
22+
href={href}
23+
legacyBehavior
24+
locale={locale}
2325
passHref={passHref}
2426
prefetch={prefetch}
2527
replace={replace}
2628
scroll={scroll}
2729
shallow={shallow}
28-
locale={locale}
2930
>
30-
<Component ref={ref} {...other} />
31+
<Component {...other} ref={ref} />
3132
</NextLink>
3233
);
3334
});

0 commit comments

Comments
 (0)