refactor: update translation key type assertions from any to string in header and sidebar components

This commit is contained in:
Ivan Mercedes 2026-07-07 13:49:56 -04:00
parent 07b20f42d4
commit 738b0dde1f
2 changed files with 4 additions and 4 deletions

View File

@ -69,7 +69,7 @@ export function Header({ onOpenSidebar }: HeaderProps) {
<Menu className="h-5 w-5" /> <Menu className="h-5 w-5" />
</button> </button>
<h1 className="truncate text-base font-semibold text-foreground sm:text-lg"> <h1 className="truncate text-base font-semibold text-foreground sm:text-lg">
{t(titleKey as any)} {t(titleKey as string)}
</h1> </h1>
</div> </div>

View File

@ -236,7 +236,7 @@ export function Sidebar({ open = false, onClose }: SidebarProps) {
)} )}
> >
<item.icon className="h-4 w-4" /> <item.icon className="h-4 w-4" />
<span className="flex-1">{t(item.labelKey as any)}</span> <span className="flex-1">{t(item.labelKey as string)}</span>
{item.beta && ( {item.beta && (
<span <span
aria-label={t("beta")} aria-label={t("beta")}
@ -285,7 +285,7 @@ export function Sidebar({ open = false, onClose }: SidebarProps) {
)} )}
> >
<item.icon className="h-4 w-4" /> <item.icon className="h-4 w-4" />
{t(item.labelKey as any)} {t(item.labelKey as string)}
</Link> </Link>
</li> </li>
); );
@ -323,7 +323,7 @@ export function Sidebar({ open = false, onClose }: SidebarProps) {
className={`ml-auto inline-flex shrink-0 items-center gap-1 rounded-full border px-1.5 py-0.5 text-[10px] font-medium uppercase tracking-wider ${meta.className}`} className={`ml-auto inline-flex shrink-0 items-center gap-1 rounded-full border px-1.5 py-0.5 text-[10px] font-medium uppercase tracking-wider ${meta.className}`}
> >
<Icon className="size-3" /> <Icon className="size-3" />
{t(meta.labelKey as any)} {t(meta.labelKey as string)}
</span> </span>
); );
})() })()