useBranchApi.ts 375 B

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