2018-10-02 12:33:21 +00:00
|
|
|
import { Platform } from 'react-native';
|
2018-07-10 13:40:32 +00:00
|
|
|
import { Navigation } from 'react-native-navigation';
|
|
|
|
import { Provider } from 'react-redux';
|
2018-09-19 14:18:32 +00:00
|
|
|
import { gestureHandlerRootHOC } from 'react-native-gesture-handler';
|
2018-07-10 13:40:32 +00:00
|
|
|
|
2018-08-10 17:26:36 +00:00
|
|
|
import OnboardingView from './OnboardingView';
|
2018-07-10 13:40:32 +00:00
|
|
|
import ProfileView from './ProfileView';
|
2018-08-31 16:46:33 +00:00
|
|
|
import RoomsListHeaderView from './RoomsListView/Header';
|
2018-07-10 13:40:32 +00:00
|
|
|
import RoomsListView from './RoomsListView';
|
|
|
|
import RoomView from './RoomView';
|
|
|
|
import SettingsView from './SettingsView';
|
|
|
|
import Sidebar from '../containers/Sidebar';
|
|
|
|
|
|
|
|
export const registerScreens = (store) => {
|
2018-08-10 17:26:36 +00:00
|
|
|
Navigation.registerComponent('OnboardingView', () => OnboardingView, store, Provider);
|
2018-07-10 13:40:32 +00:00
|
|
|
Navigation.registerComponent('ProfileView', () => ProfileView, store, Provider);
|
2018-08-31 16:46:33 +00:00
|
|
|
Navigation.registerComponent('RoomsListHeaderView', () => RoomsListHeaderView, store, Provider);
|
2018-10-02 12:33:21 +00:00
|
|
|
|
|
|
|
if (Platform.OS === 'android') {
|
|
|
|
const RoomsListSearchView = require('./RoomsListView/Search');
|
|
|
|
Navigation.registerComponent('RoomsListSearchView', () => RoomsListSearchView, store, Provider);
|
|
|
|
}
|
|
|
|
|
2018-09-19 14:18:32 +00:00
|
|
|
Navigation.registerComponent('RoomsListView', () => gestureHandlerRootHOC(RoomsListView), store, Provider);
|
|
|
|
Navigation.registerComponent('RoomView', () => gestureHandlerRootHOC(RoomView), store, Provider);
|
2018-07-10 13:40:32 +00:00
|
|
|
Navigation.registerComponent('SettingsView', () => SettingsView, store, Provider);
|
|
|
|
Navigation.registerComponent('Sidebar', () => Sidebar, store, Provider);
|
|
|
|
};
|