useTimetableApi.ts 399 B

123456789101112131415161718
  1. import { useApi } from './useApi'
  2. export function useTimetableApi() {
  3. const { checkModule } = useApi()
  4. const log = useLogger('TimetableApi')
  5. try {
  6. const timetableModule = checkModule('timetable')
  7. return {
  8. timetable: timetableModule,
  9. }
  10. } catch (e) {
  11. log.error('Ошибка инициализации TimetableApi:', e)
  12. return {
  13. timetable: null,
  14. }
  15. }
  16. }