feat(admin): Control Center redesign, Explore dual-view и полный RU/EN i18n
CI / test (push) Failing after 3m9s
CI / push-image (push) Has been skipped
CI / ci-done (push) Failing after 0s

Refs EventHub/EventHubFrontAdmin#32
This commit is contained in:
2026-07-14 17:58:33 +03:00
parent de379e28bf
commit fd2c1f10ad
95 changed files with 12699 additions and 4410 deletions
+6 -5
View File
@@ -1,7 +1,8 @@
import { useQuery, useMutation, useQueryClient } from '@tanstack/react-query';
import { eventsApi } from '../api/eventsApi';
import { Event, EventListParams } from '../types/api';
import { message } from 'antd';
import { notify } from '@/lib/notify';
import i18n from '@/i18n';
import { normalizeData } from '../utils/normalize';
export const useEvents = (params: EventListParams) => {
@@ -29,9 +30,9 @@ export const useUpdateEvent = () => {
eventsApi.updateEvent(id, data),
onSuccess: () => {
queryClient.invalidateQueries({ queryKey: ['events'] });
message.success('Событие обновлено');
notify.success(i18n.t('common.entityUpdated'));
},
onError: () => message.error('Ошибка обновления'),
onError: () => notify.error(i18n.t('common.updateError')),
});
};
@@ -41,9 +42,9 @@ export const useDeleteEvent = () => {
mutationFn: (id: string) => eventsApi.deleteEvent(id),
onSuccess: () => {
queryClient.invalidateQueries({ queryKey: ['events'] });
message.success('Событие удалено');
notify.success(i18n.t('common.entityDeleted'));
},
onError: () => message.error('Ошибка удаления'),
onError: () => notify.error(i18n.t('common.deleteError')),
});
};