Skip to content

Commit c41c774

Browse files
committed
Fix types
1 parent 925205a commit c41c774

File tree

3 files changed

+16
-14
lines changed

3 files changed

+16
-14
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
"build": "NODE_ENV=production next build",
1010
"start": "next dev",
1111
"lint": "eslint src/**/*.ts src/**/*.tsx",
12-
"bands": "node src/lib/generateSlugs.js"
12+
"bands": "node src/lib/generateSlugs.js",
13+
"types": "npx tsc --noEmit"
1314
},
1415
"author": "Daniel Saewitz",
1516
"license": "MIT",

src/components/TodayInHistoryRow.tsx

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
import { RawParams } from '@/types/params';
2-
import Row from './Row';
3-
import { fetchToday } from './TodayInHistoryColumn';
4-
import { simplePluralize } from '@/lib/utils';
5-
import { Suspense } from 'react';
1+
import RelistenAPI from '@/lib/RelistenAPI';
62
import { getCurrentMonthDay } from '@/lib/timezone';
3+
import { simplePluralize } from '@/lib/utils';
4+
import { RawParams } from '@/types/params';
75
import { format } from 'date-fns';
8-
import RelistenAPI from '@/lib/RelistenAPI';
6+
import { Suspense } from 'react';
7+
import Row from './Row';
98

109
const TodayInHistoryRow = async ({ artistSlug }: Pick<RawParams, 'artistSlug'>) => {
1110
const currentMonthDay = await getCurrentMonthDay();

src/components/YearsColumn.tsx

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
11
import sortActiveBands from '../lib/sortActiveBands';
22
import { simplePluralize } from '../lib/utils';
33

4-
import { RawParams } from '@/types/params';
54
import RelistenAPI from '@/lib/RelistenAPI';
6-
import { Year } from '../types';
5+
import { RawParams } from '@/types/params';
6+
import { notFound } from 'next/navigation';
77
import Column from './Column';
88
import Row from './Row';
99
import TodayInHistoryRow from './TodayInHistoryRow';
1010

1111
const YearsColumn = async ({ artistSlug }: Pick<RawParams, 'artistSlug'>) => {
12-
const [artists, artistYears] = await Promise.all([RelistenAPI.fetchArtists(), RelistenAPI.fetchYears(artistSlug)]).catch(
13-
() => {
14-
notFound();
15-
}
16-
);
12+
const [artists, artistYears] = await Promise.all([
13+
RelistenAPI.fetchArtists(),
14+
RelistenAPI.fetchYears(artistSlug),
15+
]).catch(() => {
16+
notFound();
17+
return [];
18+
});
1719

1820
const artist = artists?.find((artist) => artist.slug === artistSlug);
1921

0 commit comments

Comments
 (0)