File tree 1 file changed +24
-0
lines changed
1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change
1
+ import { generateStaticParams as chapterParams } from '@/app/writers/[writer]/novels/[novel]/[chapter]/page'
2
+ import { generateStaticParams as novelParams } from '@/app/writers/[writer]/novels/[novel]/page'
3
+ import { generateStaticParams as writerParams } from '@/app/writers/[writer]/page'
4
+
5
+ import logger from '@/library/logger'
6
+
7
+ async function logParams < T > ( name : string , paramsFunction : ( ) => Promise < T [ ] > ) {
8
+ const staticParams = await paramsFunction ( )
9
+ logger . info ( name , staticParams )
10
+ }
11
+
12
+ async function runTests ( ) {
13
+ await logParams ( 'Novel params' , novelParams )
14
+ await logParams ( 'Chapter params' , chapterParams )
15
+ await logParams ( 'Writer params' , writerParams )
16
+ }
17
+
18
+ runTests ( ) . catch ( ( error ) => {
19
+ logger . error ( 'Error while logging static params:' , error )
20
+ } )
21
+
22
+ /*
23
+ pnpm tsx paramsTest
24
+ */
You can’t perform that action at this time.
0 commit comments