feat(empty-state-illustrations): EmptyState-Component für leere Listen [tsc:fail]

This commit is contained in:
Dennis (via Claude+Gemma) 2026-05-23 09:33:49 +02:00
parent 141c7f81dd
commit 9a71f7e13e
3 changed files with 43 additions and 31 deletions

View File

@ -1,5 +1,8 @@
{ {
"completed_features": [], "completed_features": [],
"current_feature": "toast-undo-pattern", "current_feature": "empty-state-illustrations",
"started_at": "2026-05-23T09:33:26.338003" "started_at": "2026-05-23T09:33:26.338003",
"attempted_features": [
"toast-undo-pattern"
]
} }

View File

@ -3500,3 +3500,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>,
- `09:33:36` **INFO** Committed feature toast-undo-pattern
- `09:33:37` **INFO** Pushed: rc=0
## Phase-3 Feature: empty-state-illustrations (2026-05-23 09:33:37)
- `09:33:37` **INFO** Description: EmptyState-Component für leere Listen
- `09:33:37` **INFO** Generating apps/web/src/components/EmptyState.tsx (EmptyState-Component. Props: icon (lucide-react component), title, des…)
- `09:33:47` **INFO** wrote 1045 chars in 10.2s (attempt 1)
- `09:33:47` **INFO** Running tsc --noEmit on api…
- `09:33: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

@ -1,47 +1,38 @@
import React from 'react'; import React from 'react';
import { Inbox, FileQuestion, PackageOpen, SearchX } from 'lucide-react'; import type { LucideIcon } from 'lucide-react';
interface EmptyStateProps { interface EmptyStateProps {
icon: LucideIcon;
title: string; title: string;
description: string; description: string;
icon?: 'inbox' | 'file' | 'package' | 'search'; actionLabel?: string;
action?: { onAction?: () => void;
label: string;
onClick: () => void;
};
} }
const IconMap = { export default function EmptyState({
inbox: Inbox, icon: Icon,
file: FileQuestion, title,
package: PackageOpen, description,
search: SearchX, actionLabel,
}; onAction,
}: EmptyStateProps) {
export default function EmptyState({ title, description, icon, action }: EmptyStateProps) {
const IconComponent = icon ? IconMap[icon] : null;
return ( return (
<div className="flex flex-col items-center justify-center p-12 text-center max-w-md mx-auto"> <div className="flex flex-col items-center justify-center text-center p-8 min-h-[400px] max-w-md mx-auto">
<div className="text-indigo-500 mb-4"> <div className="p-4 bg-slate-100 rounded-full mb-4">
{IconComponent ? ( <Icon className="w-12 h-12 text-slate-400" />
<IconComponent className="w-16 h-16" strokeWidth={1.5} />
) : (
<span className="text-6xl">📋</span>
)}
</div> </div>
<h3 className="text-lg font-semibold text-slate-900 dark:text-white mb-2"> <h3 className="text-lg font-bold text-slate-900 mb-2">
{title} {title}
</h3> </h3>
<p className="text-slate-500 dark:text-slate-400 mb-6"> <p className="text-sm text-slate-500 mb-6">
{description} {description}
</p> </p>
{action && ( {actionLabel && onAction && (
<button <button
onClick={action.onClick} onClick={onAction}
className="px-4 py-2 bg-indigo-600 hover:bg-indigo-700 text-white rounded-lg font-medium transition-colors duration-200 shadow-sm" className="px-4 py-2 text-sm font-medium text-white bg-indigo-600 rounded-md hover:bg-indigo-700 transition-colors"
> >
{action.label} {actionLabel}
</button> </button>
)} )}
</div> </div>