50 lines
2.2 KiB
JavaScript
50 lines
2.2 KiB
JavaScript
/*
|
|
Предрейсовые осмотры - мобильное приложение
|
|
Корневой файл приложения
|
|
*/
|
|
|
|
//---------------------
|
|
//Подключение библиотек
|
|
//---------------------
|
|
|
|
const React = require('react'); //React
|
|
const AppErrorBoundary = require('./src/components/layout/AppErrorBoundary'); //Обработчик ошибок
|
|
const AppMessagingProvider = require('./src/components/layout/AppMessagingProvider').AppMessagingProvider; //Провайдер сообщений
|
|
const AppNavigationProvider = require('./src/components/layout/AppNavigationProvider').AppNavigationProvider; //Провайдер навигации
|
|
const AppModeProvider = require('./src/components/layout/AppModeProvider').AppModeProvider; //Провайдер режима работы
|
|
const AppLocalDbProvider = require('./src/components/layout/AppLocalDbProvider').AppLocalDbProvider; //Провайдер локальной БД
|
|
const AppServerProvider = require('./src/components/layout/AppServerProvider').AppServerProvider; //Провайдер сервера
|
|
const AppPreTripInspectionsProvider = require('./src/components/layout/AppPreTripInspectionsProvider').AppPreTripInspectionsProvider; //Провайдер осмотров
|
|
const AppRoot = require('./src/components/layout/AppRoot'); //Корневой layout приложения
|
|
|
|
//-----------
|
|
//Тело модуля
|
|
//-----------
|
|
|
|
//Основное приложение
|
|
function App() {
|
|
return (
|
|
<AppErrorBoundary>
|
|
<AppMessagingProvider>
|
|
<AppNavigationProvider>
|
|
<AppLocalDbProvider>
|
|
<AppModeProvider>
|
|
<AppServerProvider>
|
|
<AppPreTripInspectionsProvider>
|
|
<AppRoot />
|
|
</AppPreTripInspectionsProvider>
|
|
</AppServerProvider>
|
|
</AppModeProvider>
|
|
</AppLocalDbProvider>
|
|
</AppNavigationProvider>
|
|
</AppMessagingProvider>
|
|
</AppErrorBoundary>
|
|
);
|
|
}
|
|
|
|
//----------------
|
|
//Интерфейс модуля
|
|
//----------------
|
|
|
|
module.exports = App;
|