File tree Expand file tree Collapse file tree 3 files changed +16
-14
lines changed Expand file tree Collapse file tree 3 files changed +16
-14
lines changed Original file line number Diff line number Diff line change 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" ,
Original file line number Diff line number Diff line change 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' ;
62import { getCurrentMonthDay } from '@/lib/timezone' ;
3+ import { simplePluralize } from '@/lib/utils' ;
4+ import { RawParams } from '@/types/params' ;
75import { format } from 'date-fns' ;
8- import RelistenAPI from '@/lib/RelistenAPI' ;
6+ import { Suspense } from 'react' ;
7+ import Row from './Row' ;
98
109const TodayInHistoryRow = async ( { artistSlug } : Pick < RawParams , 'artistSlug' > ) => {
1110 const currentMonthDay = await getCurrentMonthDay ( ) ;
Original file line number Diff line number Diff line change 11import sortActiveBands from '../lib/sortActiveBands' ;
22import { simplePluralize } from '../lib/utils' ;
33
4- import { RawParams } from '@/types/params' ;
54import RelistenAPI from '@/lib/RelistenAPI' ;
6- import { Year } from '../types' ;
5+ import { RawParams } from '@/types/params' ;
6+ import { notFound } from 'next/navigation' ;
77import Column from './Column' ;
88import Row from './Row' ;
99import TodayInHistoryRow from './TodayInHistoryRow' ;
1010
1111const 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
You can’t perform that action at this time.
0 commit comments