feat(nav-link-component): NavLink mit active-State (Tanstack-Router-kompatibel) [tsc:fail]

This commit is contained in:
Dennis (via Claude+Gemma) 2026-05-23 10:44:10 +02:00
parent f554bf6107
commit 0f33c726bc
3 changed files with 47 additions and 2 deletions

View File

@ -1,9 +1,10 @@
{
"completed_features": [],
"current_feature": "loader-component",
"current_feature": "nav-link-component",
"started_at": "2026-05-23T10:43:31.771649",
"attempted_features": [
"footer-component",
"hint-component"
"hint-component",
"loader-component"
]
}

View File

@ -4642,3 +4642,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>,
- `10:44:02` **INFO** Committed feature loader-component
- `10:44:03` **INFO** Pushed: rc=0
## Phase-3 Feature: nav-link-component (2026-05-23 10:44:03)
- `10:44:03` **INFO** Description: NavLink mit active-State (Tanstack-Router-kompatibel)
- `10:44:03` **INFO** Generating apps/web/src/components/NavLink.tsx (NavLink-Component. Props: to, label, icon?. Verwendet @tanstack/react-…)
- `10:44:09` **INFO** wrote 770 chars in 6.0s (attempt 1)
- `10:44:09` **INFO** Running tsc --noEmit on api…
- `10:44:10` **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,26 @@
import type { LinkProps } from "@tanstack/react-router";
import { Link } from "@tanstack/react-router";
import type { ComponentProps } from "react";
interface NavLinkProps extends Omit<LinkProps, "children"> {
label: string;
icon?: React.ReactNode;
}
export default function NavLink({ label, icon, ...props }: NavLinkProps) {
return (
<Link
{...props}
className={({ isActive }) =>
`flex items-center gap-2 px-3 py-2 rounded-md transition-colors cursor-pointer ${
isActive
? "bg-zinc-100 font-medium text-zinc-900"
: "text-zinc-600 hover:bg-zinc-50 hover:text-zinc-900"
}`
}
>
{icon && <span className="flex-shrink-0">{icon}</span>}
<span>{label}</span>
</Link>
);
}