useGalleryApi.ts 383 B

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