refactor: update translation key types and simplify delete aria-label implementation

This commit is contained in:
Ivan Mercedes 2026-07-07 21:00:33 -04:00
parent a6596de2c9
commit c30e117552
2 changed files with 2 additions and 2 deletions

View File

@ -115,7 +115,7 @@ function fmtDate(iso: string): string {
}); });
} }
function fmtExpiresIn(iso: string, t: (key: string, values?: Record<string, unknown>) => string): string { function fmtExpiresIn(iso: string, t: (key: string, values?: Record<string, string | number>) => string): string {
const ms = new Date(iso).getTime() - Date.now(); const ms = new Date(iso).getTime() - Date.now();
if (ms <= 0) return t('expired'); if (ms <= 0) return t('expired');
const days = Math.floor(ms / (24 * 60 * 60 * 1000)); const days = Math.floor(ms / (24 * 60 * 60 * 1000));

View File

@ -188,7 +188,7 @@ export function TagManager() {
<button <button
type="button" type="button"
onClick={() => confirmDelete(tag)} onClick={() => confirmDelete(tag)}
aria-label={t('deleteAria', { name: tag.name, bold: (chunks: React.ReactNode) => <strong>{chunks}</strong> })} aria-label={t('deleteAria', { name: tag.name })}
className="ml-0.5 rounded-full p-0.5 opacity-60 transition-opacity hover:bg-black/10 hover:opacity-100 dark:hover:bg-white/10" className="ml-0.5 rounded-full p-0.5 opacity-60 transition-opacity hover:bg-black/10 hover:opacity-100 dark:hover:bg-white/10"
> >
<X className="size-3" /> <X className="size-3" />