fix: cast translation keys for ESLint

This commit is contained in:
Dustin Healy 2025-12-15 04:54:13 -08:00
parent 3213f574c6
commit a5d17e08ce

View file

@ -12,6 +12,7 @@ import {
ExternalLink, ExternalLink,
} from 'lucide-react'; } from 'lucide-react';
import type { SharedLinkItem, SharedLinksListParams } from 'librechat-data-provider'; import type { SharedLinkItem, SharedLinksListParams } from 'librechat-data-provider';
import type { TranslationKeys } from '~/hooks';
import { import {
OGDialog, OGDialog,
useToastContext, useToastContext,
@ -120,7 +121,7 @@ export default function SharedLinks() {
if (validRows.length === 0) { if (validRows.length === 0) {
showToast({ showToast({
message: localize('com_ui_no_valid_items'), message: localize('com_ui_no_valid_items' as TranslationKeys),
severity: NotificationSeverity.WARNING, severity: NotificationSeverity.WARNING,
}); });
return; return;
@ -134,15 +135,15 @@ export default function SharedLinks() {
showToast({ showToast({
message: localize( message: localize(
validRows.length === 1 validRows.length === 1
? 'com_ui_shared_link_delete_success' ? ('com_ui_shared_link_delete_success' as TranslationKeys)
: 'com_ui_shared_link_bulk_delete_success', : ('com_ui_shared_link_bulk_delete_success' as TranslationKeys),
), ),
severity: NotificationSeverity.SUCCESS, severity: NotificationSeverity.SUCCESS,
}); });
} catch (error) { } catch (error) {
console.error('Failed to delete shared links:', error); console.error('Failed to delete shared links:', error);
showToast({ showToast({
message: localize('com_ui_bulk_delete_error'), message: localize('com_ui_bulk_delete_error' as TranslationKeys),
severity: NotificationSeverity.ERROR, severity: NotificationSeverity.ERROR,
}); });
} }
@ -225,10 +226,8 @@ export default function SharedLinks() {
<Button <Button
variant="ghost" variant="ghost"
className="px-2 py-0 text-xs hover:bg-surface-hover sm:px-2 sm:py-2 sm:text-sm" className="px-2 py-0 text-xs hover:bg-surface-hover sm:px-2 sm:py-2 sm:text-sm"
onClick={() => aria-label={localize('com_ui_creation_date_sort' as TranslationKeys)}
handleSort('createdAt', isSorted && sortDirection === 'asc' ? 'desc' : 'asc') aria-current={sortState ? 'true' : 'false'}
}
aria-label={localize('com_ui_creation_date_sort')}
> >
{localize('com_ui_date')} {localize('com_ui_date')}
{isSorted && sortDirection === 'asc' && ( {isSorted && sortDirection === 'asc' && (