Skip to content

Commit 0c48046

Browse files
authored
fix: update to next and react (#63)
1 parent 72db1d5 commit 0c48046

File tree

6 files changed

+373
-1788
lines changed

6 files changed

+373
-1788
lines changed

next.config.js

Lines changed: 26 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,34 @@
11
/** @type {import('next').NextConfig} */
22
const nextConfig = {
3-
eslint: {
4-
dirs: ['src'],
5-
},
6-
73
reactStrictMode: true,
8-
swcMinify: true,
94

105
images: {
11-
domains: [
12-
'storage.googleapis.com',
13-
'storage.tally.so',
14-
'images.unsplash.com',
15-
'fairdataihub.org',
16-
'i.imgur.com',
17-
'cdn.aireadi.org',
6+
dangerouslyAllowSVG: true,
7+
remotePatterns: [
8+
{
9+
protocol: 'https',
10+
hostname: 'storage.googleapis.com',
11+
},
12+
{
13+
protocol: 'https',
14+
hostname: 'storage.tally.so',
15+
},
16+
{
17+
protocol: 'https',
18+
hostname: 'images.unsplash.com',
19+
},
20+
{
21+
protocol: 'https',
22+
hostname: 'fairdataihub.org',
23+
},
24+
{
25+
protocol: 'https',
26+
hostname: 'i.imgur.com',
27+
},
28+
{
29+
protocol: 'https',
30+
hostname: 'cdn.aireadi.org',
31+
},
1832
],
1933
},
2034

@@ -27,25 +41,6 @@ const nextConfig = {
2741
},
2842
];
2943
},
30-
31-
// SVGR
32-
webpack(config) {
33-
config.module.rules.push({
34-
test: /\.svg$/i,
35-
issuer: /\.[jt]sx?$/,
36-
use: [
37-
{
38-
loader: '@svgr/webpack',
39-
options: {
40-
typescript: true,
41-
icon: true,
42-
},
43-
},
44-
],
45-
});
46-
47-
return config;
48-
},
4944
};
5045

5146
module.exports = nextConfig;

package.json

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@
3737
"framer-motion": "^8.0.2",
3838
"gray-matter": "^4.0.3",
3939
"html-react-parser": "^3.0.4",
40-
"next": "^13.0.2",
40+
"next": "^16.0.7",
4141
"plaiceholder": "^2.5.0",
42-
"react": "^18.2.0",
43-
"react-dom": "^18.2.0",
42+
"react": "^19.2.1",
43+
"react-dom": "^19.2.1",
4444
"react-icons": "^4.6.0",
4545
"react-lottie-player": "2.1.0",
4646
"react-toastify": "^9.1.1",
@@ -69,10 +69,8 @@
6969
"@svgr/webpack": "^6.5.1",
7070
"@tailwindcss/forms": "^0.5.3",
7171
"@tailwindcss/typography": "^0.5.8",
72-
"@testing-library/jest-dom": "^5.16.5",
7372
"@testing-library/react": "^13.4.0",
7473
"@types/d3": "^7.4.3",
75-
"@types/jest": "^29.2.3",
7674
"@types/mocha": "^10.0.1",
7775
"@types/react": "^18.0.25",
7876
"@typescript-eslint/eslint-plugin": "^5.42.0",
@@ -84,7 +82,6 @@
8482
"eslint-plugin-prettier": "^5.1.3",
8583
"eslint-plugin-simple-import-sort": "^7.0.0",
8684
"eslint-plugin-unused-imports": "^2.0.0",
87-
"jest": "^27.5.1",
8885
"megasanjay-devmoji": "^1.2.1",
8986
"next-router-mock": "^0.7.4",
9087
"next-sitemap": "^2.5.28",
@@ -94,7 +91,7 @@
9491
"run-script-os": "^1.1.6",
9592
"tailwindcss": "^3.2.2",
9693
"tailwindcss-debug-screens": "^2.2.1",
97-
"typescript": "^4.8.4"
94+
"typescript": "5.9.3"
9895
},
9996
"config": {
10097
"commitizen": {
@@ -105,4 +102,4 @@
105102
"node": "22.18.0",
106103
"yarn": "1.22.22"
107104
}
108-
}
105+
}

src/constant/env.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ export const isLocal = process.env.NODE_ENV === 'development';
44

55
export const showLogger = isLocal
66
? true
7-
: process.env.NEXT_PUBLIC_SHOW_LOGGER === 'true' ?? false;
7+
: process.env.NEXT_PUBLIC_SHOW_LOGGER === 'true';

src/pages/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -184,18 +184,18 @@ const HomePage: React.FC<EventItem> = ({ slug, frontMatter }) => {
184184
<div className='mx-auto flex max-w-screen-xl flex-col-reverse items-center gap-16 px-8 md:flex-col'>
185185
<div className='mt-8 grid grid-cols-1 gap-4 md:grid-cols-3'>
186186
<ImageWithCredit
187-
src='https://cdn.aireadi.org/website/UAB-Landscape.jpg'
187+
src='https://cdn.aireadi.org/website/aqqrujk.jpg'
188188
alt='Photo of the UAB Callahan Eye Hospital'
189189
author='UAB Media Department'
190190
/>
191191

192192
<ImageWithCredit
193-
src='https://cdn.aireadi.org/website/UCSD-Landscape.jpg'
193+
src='https://cdn.aireadi.org/website/nhgxpxn.jpg'
194194
alt='Photo of the UCSD Medical Center'
195195
author='Board of Regents of the University of California'
196196
/>
197197
<ImageWithCredit
198-
src='https://cdn.aireadi.org/website/UW-Landscape.jpg'
198+
src='https://cdn.aireadi.org/website/espmdrt.jpg'
199199
alt='Photo of the UW Medicine building'
200200
author='Clare McLean/UW Medicine'
201201
/>

tsconfig.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,13 @@
1212
"moduleResolution": "node",
1313
"resolveJsonModule": true,
1414
"isolatedModules": true,
15-
"jsx": "preserve",
15+
"jsx": "react-jsx",
1616
"baseUrl": ".",
1717
"paths": {
1818
"@/*": ["./src/*"],
1919
"~/*": ["./public/*"]
2020
},
2121
"incremental": true,
22-
"types": ["node", "jest", "mocha", "@testing-library/jest-dom"],
2322
"typeRoots": ["./src/types"],
2423
"plugins": [
2524
{

0 commit comments

Comments
 (0)