- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
- 71
- 72
- 73
- 74
- 75
- 76
import React, { Component } from 'react';
import { View, Text } from 'react-native';
import { Provider } from 'react-redux';
import Store from './src/Store';
import { Header, CryptoContainer, ControlPanel, Homepage } from './src/components';
import Drawer from 'react-native-drawer';
import {
Scene,
Router,
Actions,
Reducer,
ActionConst,
Overlay,
Tabs,
Modal,
Stack,
Lightbox,
} from 'react-native-router-flux';
export default class App extends Component {
constructor(props) {
super(props);
this.state = { isOpen: false };
}
toggleSidebar = () => {
console.debug(this.state.isOpen);
if (this.state.isOpen) {
this._drawer.close();
} else {
this._drawer.open();
}
}
onOpen = () => {
console.debug('onOpen');
this.setState({ isOpen: true });
}
onClose = () => {
console.debug('onClose');
this.setState({ isOpen: false });
}
render() {
// <View>
// <Header toggleSidebar={this.toggleSidebar} />
// <CryptoContainer />
// </View>
return (
<Provider store={Store}>
<Drawer
content={<ControlPanel />}
ref={(ref) => this._drawer = ref}
openDrawerOffset={100}
onOpen={this.onOpen}
onClose={this.onClose}
openDrawerOffset={0.5}
tapToClose={true}
// open={true}
>
<View>
<Router>
<Stack key="root">
<Scene key="homepage" component={Homepage} title="Homepage" />
</Stack>
</Router>
</View>
</Drawer>
</Provider>
);
}
}
Комментарии (0) RSS
Добавить комментарий