Skip to content

Commit 6b65192

Browse files
AdrianAndersenmathiazom
authored andcommitted
chore: bump Next.js to 15.5
1 parent 4c79ab7 commit 6b65192

File tree

12 files changed

+364
-393
lines changed

12 files changed

+364
-393
lines changed

eslint.config.mjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import jsxA11y from "eslint-plugin-jsx-a11y";
88
import noRelativeImportPathsPlugin from "eslint-plugin-no-relative-import-paths";
99
import reactPlugin from "eslint-plugin-react";
1010
import reactCompiler from "eslint-plugin-react-compiler";
11+
// eslint-disable-next-line import-x/default
1112
import hooksPlugin from "eslint-plugin-react-hooks";
1213
import tseslint from "typescript-eslint";
1314

@@ -44,6 +45,7 @@ export default tseslint.config(
4445
...hooksPlugin.configs.recommended.rules,
4546
"no-relative-import-paths/no-relative-import-paths": "error",
4647
"react-compiler/react-compiler": "error",
48+
"import-x/no-named-as-default-member": "off",
4749
/** @see https://medium.com/weekly-webtips/how-to-sort-imports-like-a-pro-in-typescript-4ee8afd7258a */
4850
"import-x/order": [
4951
"error",

next-env.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/// <reference types="next" />
22
/// <reference types="next/image-types/global" />
3+
/// <reference path="./.next/types/routes.d.ts" />
34

45
// NOTE: This file should not be edited
56
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.

next.config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const withSerwist = withSerwistInit({
66
});
77

88
export default withSerwist({
9-
reactStrictMode: true,
9+
typedRoutes: true,
1010
staticPageGenerationTimeout: 120,
1111
...(global.process.env["BUILD_STANDALONE"] === "true" ? { output: "standalone" } : {}),
1212
async redirects() {
@@ -29,7 +29,7 @@ export default withSerwist({
2929
remotePatterns: [
3030
{
3131
protocol: "https",
32-
hostname: new URL(global.process.env["NEXT_PUBLIC_CONFIG_HOST"]!).hostname,
32+
hostname: new URL(global.process.env["NEXT_PUBLIC_CONFIG_HOST"] ?? "").hostname,
3333
},
3434
{
3535
protocol: "https",

package.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
"prod": "run-s build start",
1111
"prettier": "prettier --write '**/*.{js,mjs,ts,tsx,md,json,yaml,css}' --ignore-path=.gitignore",
1212
"prettier:check": "prettier --check '**/*.{js,mjs,ts,tsx,md,json,yaml,css}' --ignore-path=.gitignore",
13-
"lint": "next lint --ignore-path=.gitignore",
14-
"lint:fix": "next lint --fix --ignore-path=.gitignore",
13+
"lint": "eslint --ignore-pattern '.next/*' --ignore-pattern 'next-env.d.ts' --ignore-pattern 'public/sw.js'",
14+
"lint:fix": "eslint --fix --ignore-pattern '.next/*' --ignore-pattern 'next-env.d.ts' --ignore-pattern 'public/sw.js'",
1515
"typecheck": "tsc --noEmit",
1616
"check": "run-p prettier:check lint typecheck",
1717
"fix": "run-s prettier lint:fix",
@@ -21,7 +21,7 @@
2121
"@emotion/cache": "^11.14.0",
2222
"@emotion/react": "^11.14.0",
2323
"@emotion/styled": "^11.14.1",
24-
"@khmyznikov/pwa-install": "^0.5.7",
24+
"@khmyznikov/pwa-install": "^0.5.8",
2525
"@mui/icons-material": "^6.4.2",
2626
"@mui/material": "^6.4.2",
2727
"@mui/material-nextjs": "^6.4.2",
@@ -30,7 +30,7 @@
3030
"js-cookie": "^3.0.5",
3131
"jwt-decode": "^4.0.0",
3232
"luxon": "^3.7.1",
33-
"next": "15.3.0",
33+
"next": "15.5.2",
3434
"react": "^19.1.1",
3535
"react-device-detect": "^2.2.3",
3636
"react-dom": "^19.1.1",
@@ -43,17 +43,17 @@
4343
"zustand": "^5.0.8"
4444
},
4545
"devDependencies": {
46-
"@eslint/js": "^9.33.0",
47-
"@next/eslint-plugin-next": "^15.3.0",
46+
"@eslint/js": "^9.34.0",
47+
"@next/eslint-plugin-next": "^15.5.2",
4848
"@tsconfig/next": "^2.0.3",
4949
"@tsconfig/strictest": "^2.0.5",
5050
"@types/js-cookie": "^3.0.6",
5151
"@types/luxon": "^3.7.1",
5252
"@types/node": "^24.3.0",
53-
"@types/react": "^19.1.10",
54-
"@types/react-dom": "^19.1.7",
53+
"@types/react": "^19.1.12",
54+
"@types/react-dom": "^19.1.9",
5555
"@types/react-swipeable-views": "^0.13.6",
56-
"eslint": "^9.33.0",
56+
"eslint": "^9.34.0",
5757
"eslint-config-prettier": "^10.1.8",
5858
"eslint-import-resolver-typescript": "^4.4.4",
5959
"eslint-plugin-import-x": "^4.16.1",
@@ -66,6 +66,6 @@
6666
"prettier": "^3.6.2",
6767
"serwist": "^9.1.1",
6868
"typescript": "^5.9.2",
69-
"typescript-eslint": "^8.40.0"
69+
"typescript-eslint": "^8.41.0"
7070
}
7171
}

pnpm-lock.yaml

Lines changed: 274 additions & 295 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pnpm-workspace.yaml

Lines changed: 0 additions & 2 deletions
This file was deleted.

src/app/[chain]/page.tsx

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,6 @@ import Chain from "@/components/Chain";
44
import { CLASS_ID_QUERY_PARAM, ISO_WEEK_QUERY_PARAM, SCROLL_TO_NOW_QUERY_PARAM } from "@/lib/consts";
55
import { fetchActiveChains, fetchChain, fetchChainPageStaticProps } from "@/lib/helpers/fetchers";
66

7-
interface Props {
8-
params: Promise<{ chain: string }>;
9-
searchParams: Promise<{
10-
[ISO_WEEK_QUERY_PARAM]: string | undefined;
11-
[SCROLL_TO_NOW_QUERY_PARAM]: string | undefined;
12-
[CLASS_ID_QUERY_PARAM]: string | undefined;
13-
}>;
14-
}
15-
167
export const dynamicParams = false;
178

189
export const revalidate = 300;
@@ -23,15 +14,17 @@ export async function generateStaticParams() {
2314
}));
2415
}
2516

26-
export default async function Page({ params, searchParams }: Props) {
17+
export default async function Page({ params, searchParams }: PageProps<"/[chain]">) {
2718
const chainIdentifier = (await params).chain;
2819
const {
2920
[ISO_WEEK_QUERY_PARAM]: rawWeekParam,
3021
[SCROLL_TO_NOW_QUERY_PARAM]: scrollToNowParam,
3122
[CLASS_ID_QUERY_PARAM]: showClassId,
3223
} = await searchParams;
3324
const { chain, weekParam, chainProfiles, scheduleCache, activityCategories, classPopularityIndex, error } =
34-
await fetchChain(chainIdentifier).then((c) => fetchChainPageStaticProps(c, rawWeekParam));
25+
await fetchChain(chainIdentifier).then((c) =>
26+
fetchChainPageStaticProps(c, Array.isArray(rawWeekParam) ? rawWeekParam[0] : rawWeekParam),
27+
);
3528

3629
const defaultLocationIds = chain.branches.flatMap((branch) => branch.locations.map(({ identifier }) => identifier));
3730

@@ -41,7 +34,7 @@ export default async function Page({ params, searchParams }: Props) {
4134
<Chain
4235
weekParam={weekParam}
4336
scrollToNow={scrollToNowParam !== undefined}
44-
showClassId={showClassId}
37+
showClassId={Array.isArray(showClassId) ? showClassId[0] : showClassId}
4538
chain={chain}
4639
classPopularityIndex={classPopularityIndex ?? {}}
4740
chainProfiles={chainProfiles}

src/app/indexPage.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ const IndexPage = ({ chainProfiles }: IndexPageProps) => {
7272
href={`/${chainProfile.identifier}`}
7373
style={{ width: "100%" }}
7474
passHref
75-
legacyBehavior
7675
>
7776
<Button
7877
sx={{

src/components/Chain.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ function Chain({
150150
const newSearchParams = new URLSearchParams(searchParams);
151151
if (c !== null) newSearchParams.set(CLASS_ID_QUERY_PARAM, c.id);
152152
else newSearchParams.delete(CLASS_ID_QUERY_PARAM);
153+
// @ts-expect-error TODO: bad route type
153154
router.replace(pathname + "?" + newSearchParams.toString());
154155
setClassInfoClass(c);
155156
},
@@ -221,6 +222,7 @@ function Chain({
221222
scrollToToday();
222223
const newSearchParams = new URLSearchParams(searchParams);
223224
newSearchParams.delete(SCROLL_TO_NOW_QUERY_PARAM);
225+
// @ts-expect-error TODO: bad route type
224226
router.replace(pathname + "?" + newSearchParams.toString());
225227
}, [pathname, router, scrollToNow, searchParams]);
226228

src/components/modals/ScheduleFiltersDialog.tsx

Lines changed: 67 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { Box, Button, Dialog, Tab, Tabs, Typography, useTheme } from "@mui/mater
33
import { blue, pink, purple } from "@mui/material/colors";
44
import DialogActions from "@mui/material/DialogActions";
55
import DialogContent from "@mui/material/DialogContent";
6-
import { DialogHeader } from "next/dist/client/components/react-dev-overlay/ui/components/dialog";
76
import { Dispatch, SetStateAction, useState } from "react";
87
import SwipeableViews from "react-swipeable-views";
98

@@ -111,76 +110,74 @@ export default function ScheduleFiltersDialog({
111110
},
112111
}}
113112
>
114-
<DialogHeader>
115-
<Tabs
116-
value={tab}
117-
onChange={handleChange}
118-
indicatorColor={"primary"}
119-
textColor="inherit"
120-
variant="fullWidth"
121-
aria-label="schedule-filters-tabs"
122-
TabIndicatorProps={{
123-
style: {
124-
backgroundColor: currentTabColor,
113+
<Tabs
114+
value={tab}
115+
onChange={handleChange}
116+
indicatorColor={"primary"}
117+
textColor="inherit"
118+
variant="fullWidth"
119+
aria-label="schedule-filters-tabs"
120+
TabIndicatorProps={{
121+
style: {
122+
backgroundColor: currentTabColor,
123+
},
124+
}}
125+
>
126+
<Tab
127+
label={"Sentre"}
128+
icon={<PlaceRounded fontSize={"small"} />}
129+
iconPosition={"start"}
130+
sx={[
131+
{
132+
minHeight: "3rem",
133+
},
134+
tab == 0
135+
? {
136+
color: LOCATIONS_COLOR[500],
137+
}
138+
: {
139+
color: null,
140+
},
141+
]}
142+
{...a11yProps(0)}
143+
/>
144+
<Tab
145+
label={"Kategorier"}
146+
icon={<CategoryRounded fontSize={"small"} />}
147+
iconPosition={"start"}
148+
sx={[
149+
{
150+
minHeight: "3rem",
151+
},
152+
tab == 1
153+
? {
154+
color: CATEGORIES_COLOR[500],
155+
}
156+
: {
157+
color: null,
158+
},
159+
]}
160+
{...a11yProps(1)}
161+
/>
162+
<Tab
163+
label={"Tidsrom"}
164+
icon={<AccessTimeRounded fontSize={"small"} />}
165+
iconPosition={"start"}
166+
sx={[
167+
{
168+
minHeight: "3rem",
125169
},
126-
}}
127-
>
128-
<Tab
129-
label={"Sentre"}
130-
icon={<PlaceRounded fontSize={"small"} />}
131-
iconPosition={"start"}
132-
sx={[
133-
{
134-
minHeight: "3rem",
135-
},
136-
tab == 0
137-
? {
138-
color: LOCATIONS_COLOR[500],
139-
}
140-
: {
141-
color: null,
142-
},
143-
]}
144-
{...a11yProps(0)}
145-
/>
146-
<Tab
147-
label={"Kategorier"}
148-
icon={<CategoryRounded fontSize={"small"} />}
149-
iconPosition={"start"}
150-
sx={[
151-
{
152-
minHeight: "3rem",
153-
},
154-
tab == 1
155-
? {
156-
color: CATEGORIES_COLOR[500],
157-
}
158-
: {
159-
color: null,
160-
},
161-
]}
162-
{...a11yProps(1)}
163-
/>
164-
<Tab
165-
label={"Tidsrom"}
166-
icon={<AccessTimeRounded fontSize={"small"} />}
167-
iconPosition={"start"}
168-
sx={[
169-
{
170-
minHeight: "3rem",
171-
},
172-
tab == 2
173-
? {
174-
color: EXCLUDE_CLASS_TIME_COLOR[500],
175-
}
176-
: {
177-
color: null,
178-
},
179-
]}
180-
{...a11yProps(2)}
181-
/>
182-
</Tabs>
183-
</DialogHeader>
170+
tab == 2
171+
? {
172+
color: EXCLUDE_CLASS_TIME_COLOR[500],
173+
}
174+
: {
175+
color: null,
176+
},
177+
]}
178+
{...a11yProps(2)}
179+
/>
180+
</Tabs>
184181
<DialogContent sx={{ padding: 0, margin: 0 }}>
185182
<SwipeableViews index={tab} onChangeIndex={handleChangeIndex}>
186183
<TabPanel value={tab} index={0} dir={theme.direction}>

0 commit comments

Comments
 (0)