-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathReduxApp.js
32 lines (29 loc) · 972 Bytes
/
ReduxApp.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import React from 'react';
import Spinner from 'react-native-loading-spinner-overlay';
import Recorder from './src/components/recorder';
import Hashtags from './src/components/hashtags';
import Player from './src/components/player';
import { connect } from 'react-redux';
import AppContainer from './src/router/router';
const mapStateToProps = state => {
return {
showRecorder: state.recorder.showRecorder,
hashtags: state.recorder.hashtags,
player: state.player,
flag: state.progress.flag
}
}
const ReduxApp = ({ showRecorder, hashtags, player, flag }) => {
return [
<AppContainer key={1} uriPrefix="/app" />,
<Recorder key={2} show={showRecorder} />,
<Hashtags key={3} hashtags={hashtags} />,
<Player key={4} player={player} />,
<Spinner
key={5}
visible={flag}
textContent={""}
/>
]
}
export default connect(mapStateToProps)(ReduxApp)