feat(list-item-component): ListItem für custom Listen [tsc:fail]

This commit is contained in:
Dennis (via Claude+Gemma) 2026-05-23 10:58:49 +02:00
parent 6d256ef154
commit 445f984ffe
3 changed files with 73 additions and 2 deletions

View File

@ -1,5 +1,8 @@
{ {
"completed_features": [], "completed_features": [],
"current_feature": "notice-component", "current_feature": "list-item-component",
"started_at": "2026-05-23T10:58:29.718105" "started_at": "2026-05-23T10:58:29.718105",
"attempted_features": [
"notice-component"
]
} }

View File

@ -4843,3 +4843,21 @@ src/index.ts(27,25): error TS2769: No overload matches this call.
Overload 1 of 3, '(plugin: FastifyPluginCallback<{ limits: { fileSize: number; }; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>, opts?: FastifyRegisterOptions<...> | undefined): FastifyInstance<...> & PromiseLike<...>', gave the following error. Overload 1 of 3, '(plugin: FastifyPluginCallback<{ limits: { fileSize: number; }; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>, opts?: FastifyRegisterOptions<...> | undefined): FastifyInstance<...> & PromiseLike<...>', gave the following error.
Argument of type 'Promise<FastifyMultipartPlugin>' is not assignable to parameter of type 'FastifyPluginCallback<{ limits: { fileSize: number; }; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>'. Argument of type 'Promise<FastifyMultipartPlugin>' is not assignable to parameter of type 'FastifyPluginCallback<{ limits: { fileSize: number; }; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>'.
Type 'Promise<FastifyMultipartPlugin>' provides no match for the signature '(instance: FastifyInstance<RawServerDefault, IncomingMessage, ServerResponse<IncomingMessage>, Type 'Promise<FastifyMultipartPlugin>' provides no match for the signature '(instance: FastifyInstance<RawServerDefault, IncomingMessage, ServerResponse<IncomingMessage>,
- `10:58:39` **INFO** Committed feature notice-component
- `10:58:40` **INFO** Pushed: rc=0
## Phase-3 Feature: list-item-component (2026-05-23 10:58:40)
- `10:58:40` **INFO** Description: ListItem für custom Listen
- `10:58:40` **INFO** Generating apps/web/src/components/ListItem.tsx (ListItem-Component. Props: title, subtitle?, leading?: ReactNode, trai…)
- `10:58:47` **INFO** wrote 1012 chars in 7.3s (attempt 1)
- `10:58:47` **INFO** Running tsc --noEmit on api…
- `10:58:49` **WARN** tsc errors:
src/db/schema.ts(37,14): error TS7022: 'customers' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer.
src/db/schema.ts(45,59): error TS7024: Function implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions.
src/db/schema.ts(49,14): error TS7022: 'projects' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer.
src/db/schema.ts(53,56): error TS7024: Function implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions.
src/index.ts(27,25): error TS2769: No overload matches this call.
Overload 1 of 3, '(plugin: FastifyPluginCallback<{ limits: { fileSize: number; }; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>, opts?: FastifyRegisterOptions<...> | undefined): FastifyInstance<...> & PromiseLike<...>', gave the following error.
Argument of type 'Promise<FastifyMultipartPlugin>' is not assignable to parameter of type 'FastifyPluginCallback<{ limits: { fileSize: number; }; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>'.
Type 'Promise<FastifyMultipartPlugin>' provides no match for the signature '(instance: FastifyInstance<RawServerDefault, IncomingMessage, ServerResponse<IncomingMessage>,

View File

@ -0,0 +1,50 @@
import React, { ReactNode } from 'react';
interface ListItemProps {
title: string;
subtitle?: string;
leading?: ReactNode;
trailing?: ReactNode;
onClick?: () => void;
}
export default function ListItem({
title,
subtitle,
leading,
trailing,
onClick,
}: ListItemProps) {
return (
<div
onClick={onClick}
className={`
flex items-center gap-3 p-3 transition-colors duration-150
${onClick ? 'cursor-pointer hover:bg-zinc-50' : ''}
`}
>
{leading && (
<div className="flex-shrink-0">
{leading}
</div>
)}
<div className="flex-1 min-w-0">
<div className="text-sm font-medium text-zinc-900 truncate">
{title}
</div>
{subtitle && (
<div className="text-xs text-zinc-500 truncate">
{subtitle}
</div>
)}
</div>
{trailing && (
<div className="flex-shrink-0">
{trailing}
</div>
)}
</div>
);
}