fix(ci): устранить ошибки eslint, блокировавшие CI
CI / test (push) Successful in 1m31s
CI / push-image (push) Successful in 8m3s
CI / ci-done (push) Successful in 0s
Deploy stage (admin) / deploy-stage-admin (push) Successful in 5m1s

Refs EventHub/EventHubFrontAdmin#32

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-07-14 18:47:10 +03:00
parent fd2c1f10ad
commit 2e669f396b
6 changed files with 23 additions and 20 deletions
-14
View File
@@ -141,17 +141,3 @@ export function CommandPalette({ open, onOpenChange }: CommandPaletteProps) {
</Dialog> </Dialog>
); );
} }
/** Глобальный хоткей Ctrl/⌘+K */
export function useCommandPaletteHotkey(onOpen: () => void) {
useEffect(() => {
const handler = (e: KeyboardEvent) => {
if ((e.metaKey || e.ctrlKey) && e.key.toLowerCase() === 'k') {
e.preventDefault();
onOpen();
}
};
window.addEventListener('keydown', handler);
return () => window.removeEventListener('keydown', handler);
}, [onOpen]);
}
+1 -1
View File
@@ -27,4 +27,4 @@ function Badge({ className, variant, ...props }: BadgeProps) {
return <div className={cn(badgeVariants({ variant }), className)} {...props} />; return <div className={cn(badgeVariants({ variant }), className)} {...props} />;
} }
export { Badge, badgeVariants }; export { Badge };
+1 -1
View File
@@ -45,4 +45,4 @@ const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
); );
Button.displayName = 'Button'; Button.displayName = 'Button';
export { Button, buttonVariants }; export { Button };
+15
View File
@@ -0,0 +1,15 @@
import { useEffect } from 'react';
/** Глобальный хоткей Ctrl/⌘+K */
export function useCommandPaletteHotkey(onOpen: () => void) {
useEffect(() => {
const handler = (e: KeyboardEvent) => {
if ((e.metaKey || e.ctrlKey) && e.key.toLowerCase() === 'k') {
e.preventDefault();
onOpen();
}
};
window.addEventListener('keydown', handler);
return () => window.removeEventListener('keydown', handler);
}, [onOpen]);
}
+2 -1
View File
@@ -49,7 +49,8 @@ import {
DropdownMenuTrigger, DropdownMenuTrigger,
} from '@/components/ui/dropdown-menu'; } from '@/components/ui/dropdown-menu';
import { ErrorBoundary } from '@/components/ErrorBoundary'; import { ErrorBoundary } from '@/components/ErrorBoundary';
import { CommandPalette, useCommandPaletteHotkey } from '@/components/CommandPalette'; import { CommandPalette } from '@/components/CommandPalette';
import { useCommandPaletteHotkey } from '@/hooks/useCommandPaletteHotkey';
import { HeaderNodeMetrics } from '@/components/HeaderNodeMetrics'; import { HeaderNodeMetrics } from '@/components/HeaderNodeMetrics';
const navIconByKey: Record<string, React.ComponentType<{ className?: string }>> = { const navIconByKey: Record<string, React.ComponentType<{ className?: string }>> = {
+4 -3
View File
@@ -161,10 +161,11 @@ const AdminListPage: React.FC = () => {
}); });
}; };
const total = data?.total;
const exploreStats = useMemo(() => { const exploreStats = useMemo(() => {
if (data?.total === undefined) return []; if (total === undefined) return [];
return [{ label: t('common.total'), value: data.total }]; return [{ label: t('common.total'), value: total }];
}, [data?.total, t]); }, [total, t]);
const columns = useMemo<ColumnDef<Admin>[]>( const columns = useMemo<ColumnDef<Admin>[]>(
() => [ () => [