From 179ddf6999f16cd2f96a0992b0461c38bddd77e2 Mon Sep 17 00:00:00 2001 From: vergiLgood1 Date: Sun, 23 Mar 2025 06:54:54 +0700 Subject: [PATCH] use IsActive props from sidebar component --- .../_components/navigations/nav-main.tsx | 26 ++++--------------- .../_components/users-table.tsx | 2 +- sigap-website/app/_components/form-field.tsx | 2 +- .../app/_components/react-hook-form-field.tsx | 2 +- sigap-website/app/_components/ui/input.tsx | 2 +- 5 files changed, 9 insertions(+), 25 deletions(-) diff --git a/sigap-website/app/(pages)/(admin)/_components/navigations/nav-main.tsx b/sigap-website/app/(pages)/(admin)/_components/navigations/nav-main.tsx index e4f4c8b..b82fb49 100644 --- a/sigap-website/app/(pages)/(admin)/_components/navigations/nav-main.tsx +++ b/sigap-website/app/(pages)/(admin)/_components/navigations/nav-main.tsx @@ -52,7 +52,7 @@ function SubSubItemComponent({ item }: { item: SubSubItem }) { asChild className={ isActive - ? "bg-primary/40 active text-primary" + ? "bg-muted active font-bold" : "" } > @@ -75,11 +75,7 @@ function SubItemComponent({ item }: { item: SubItem }) { {item.icon && ( @@ -97,11 +93,7 @@ function SubItemComponent({ item }: { item: SubItem }) { {item.icon && ( @@ -136,11 +128,7 @@ function RecursiveNavItem({ item, index }: { item: NavItem; index: number }) { {item.icon && ( @@ -164,11 +152,7 @@ function RecursiveNavItem({ item, index }: { item: NavItem; index: number }) { {item.icon && ( diff --git a/sigap-website/app/(pages)/(admin)/dashboard/user-management/_components/users-table.tsx b/sigap-website/app/(pages)/(admin)/dashboard/user-management/_components/users-table.tsx index 9f4f870..23f2324 100644 --- a/sigap-website/app/(pages)/(admin)/dashboard/user-management/_components/users-table.tsx +++ b/sigap-website/app/(pages)/(admin)/dashboard/user-management/_components/users-table.tsx @@ -317,7 +317,7 @@ export const createUserColumns = ( /* handle delete */ }} > - + Delete {input} - {error &&

{error}

} + {error &&

{error}

} ); } diff --git a/sigap-website/app/_components/react-hook-form-field.tsx b/sigap-website/app/_components/react-hook-form-field.tsx index be4d670..fddb1ef 100644 --- a/sigap-website/app/_components/react-hook-form-field.tsx +++ b/sigap-website/app/_components/react-hook-form-field.tsx @@ -33,7 +33,7 @@ export function ReactHookFormField({ {...registration} {...props} /> - {error &&

{error.message}

} + {error &&

{error.message}

} ) diff --git a/sigap-website/app/_components/ui/input.tsx b/sigap-website/app/_components/ui/input.tsx index ef202c2..9e2acb1 100644 --- a/sigap-website/app/_components/ui/input.tsx +++ b/sigap-website/app/_components/ui/input.tsx @@ -14,7 +14,7 @@ const Input = React.forwardRef( type={type} className={cn( "flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50", - error && "ring-2 ring-red-500 focus-visible:ring-red-500", + error && "ring-2 ring-destructive focus-visible:ring-destructive", className )} ref={ref}