From 0f33c726bcfb641af3fb1aad162b528d6f6c1fd6 Mon Sep 17 00:00:00 2001 From: "Dennis (via Claude+Gemma)" Date: Sat, 23 May 2026 10:44:10 +0200 Subject: [PATCH] feat(nav-link-component): NavLink mit active-State (Tanstack-Router-kompatibel) [tsc:fail] --- .phase45-state.json | 5 +++-- GENERATION_LOG.md | 18 ++++++++++++++++++ apps/web/src/components/NavLink.tsx | 26 ++++++++++++++++++++++++++ 3 files changed, 47 insertions(+), 2 deletions(-) create mode 100644 apps/web/src/components/NavLink.tsx diff --git a/.phase45-state.json b/.phase45-state.json index 92bdd50..6a00b61 100644 --- a/.phase45-state.json +++ b/.phase45-state.json @@ -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" ] } \ No newline at end of file diff --git a/GENERATION_LOG.md b/GENERATION_LOG.md index 59ef78e..fad37ed 100644 --- a/GENERATION_LOG.md +++ b/GENERATION_LOG.md @@ -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' is not assignable to parameter of type 'FastifyPluginCallback<{ limits: { fileSize: number; }; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>'. Type 'Promise' provides no match for the signature '(instance: FastifyInstance, +- `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' is not assignable to parameter of type 'FastifyPluginCallback<{ limits: { fileSize: number; }; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>'. + Type 'Promise' provides no match for the signature '(instance: FastifyInstance, diff --git a/apps/web/src/components/NavLink.tsx b/apps/web/src/components/NavLink.tsx new file mode 100644 index 0000000..e51bbef --- /dev/null +++ b/apps/web/src/components/NavLink.tsx @@ -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 { + label: string; + icon?: React.ReactNode; +} + +export default function NavLink({ label, icon, ...props }: NavLinkProps) { + return ( + + `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 && {icon}} + {label} + + ); +} \ No newline at end of file