File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed
nextjs-app/app/components
nextjs-pages/pages/api/todos Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change 77 List ,
88 ListPropTypes ,
99 ResponsivePopover ,
10- ResponsivePopoverDomRef ,
1110 ShellBar ,
1211 ShellBarItem ,
1312 ShellBarItemPropTypes ,
@@ -66,7 +65,7 @@ export function AppShellBar() {
6665 className = { classes . popover }
6766 open = { popoverOpen }
6867 opener = { popoverOpenerRef . current }
69- onClose = { ( e ) => {
68+ onClose = { ( ) => {
7069 setPopoverOpen ( false ) ;
7170 } }
7271 >
Original file line number Diff line number Diff line change @@ -7,11 +7,11 @@ export async function fetchTodoById(id: string): Promise<Todo | undefined> {
77 return todos . find ( ( todo ) => `${ todo . id } ` === id ) ;
88}
99
10- export default async function handler ( req : NextApiRequest , res : NextApiResponse < Todo > ) {
10+ export default async function handler ( req : NextApiRequest , res : NextApiResponse < Todo | { error : string } > ) {
1111 const todo = await fetchTodoById ( req . query . id as string ) ;
1212 if ( todo ) {
1313 res . status ( 200 ) . json ( todo ) ;
1414 } else {
15- res . status ( 404 ) . json ( { error : 'Not found' } as any ) ;
15+ res . status ( 404 ) . json ( { error : 'Not found' } ) ;
1616 }
1717}
You can’t perform that action at this time.
0 commit comments