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": [],
"current_feature": "toast-undo-pattern",
"started_at": "2026-05-23T09:33:26.338003"
"current_feature": "empty-state-illustrations",
"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.
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>,
- `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 { Inbox, FileQuestion, PackageOpen, SearchX } from 'lucide-react';
import type { LucideIcon } from 'lucide-react';
interface EmptyStateProps {
icon: LucideIcon;
title: string;
description: string;
icon?: 'inbox' | 'file' | 'package' | 'search';
action?: {
label: string;
onClick: () => void;
};
actionLabel?: string;
onAction?: () => void;
}
const IconMap = {
inbox: Inbox,
file: FileQuestion,
package: PackageOpen,
search: SearchX,
};
export default function EmptyState({ title, description, icon, action }: EmptyStateProps) {
const IconComponent = icon ? IconMap[icon] : null;
export default function EmptyState({
icon: Icon,
title,
description,
actionLabel,
onAction,
}: EmptyStateProps) {
return (
<div className="flex flex-col items-center justify-center p-12 text-center max-w-md mx-auto">
<div className="text-indigo-500 mb-4">
{IconComponent ? (
<IconComponent className="w-16 h-16" strokeWidth={1.5} />
) : (
<span className="text-6xl">📋</span>
)}
<div className="flex flex-col items-center justify-center text-center p-8 min-h-[400px] max-w-md mx-auto">
<div className="p-4 bg-slate-100 rounded-full mb-4">
<Icon className="w-12 h-12 text-slate-400" />
</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}
</h3>
<p className="text-slate-500 dark:text-slate-400 mb-6">
<p className="text-sm text-slate-500 mb-6">
{description}
</p>
{action && (
{actionLabel && onAction && (
<button
onClick={action.onClick}
className="px-4 py-2 bg-indigo-600 hover:bg-indigo-700 text-white rounded-lg font-medium transition-colors duration-200 shadow-sm"
onClick={onAction}
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>
)}
</div>