Refactored to use src/routes
This commit is contained in:
parent
86b33e0164
commit
2aa71ae941
9 changed files with 20 additions and 20 deletions
|
|
@ -6,12 +6,12 @@ import React from 'react';
|
|||
import PureRenderMixin from 'react-addons-pure-render-mixin';
|
||||
|
||||
import Drawer from 'react-native-drawer';
|
||||
import ChannelSidebar from './channel_sidebar.js';
|
||||
import Loading from './loading.js';
|
||||
import RightSidebarMenu from './right_sidebar_menu.js';
|
||||
import ChannelSidebar from 'components/channel_sidebar.js';
|
||||
import Loading from 'components/loading.js';
|
||||
import RightSidebarMenu from 'components/right_sidebar_menu.js';
|
||||
import {StatusBar, Text, TouchableHighlight, View} from 'react-native';
|
||||
|
||||
export default class MainView extends React.Component {
|
||||
export default class Channel extends React.Component {
|
||||
static propTypes = {
|
||||
actions: React.PropTypes.object.isRequired,
|
||||
currentTeam: React.PropTypes.object,
|
||||
|
|
@ -4,7 +4,7 @@
|
|||
import {bindActionCreators} from 'redux';
|
||||
import {connect} from 'react-redux';
|
||||
import {fetchMyChannelsAndMembers} from 'actions/channels.js';
|
||||
import MainView from 'components/main_view.js';
|
||||
import Channel from './channel.js';
|
||||
|
||||
function mapStateToProps(state, ownProps) {
|
||||
let currentChannel;
|
||||
|
|
@ -39,4 +39,4 @@ function mapDispatchToProps(dispatch) {
|
|||
};
|
||||
}
|
||||
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(MainView);
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(Channel);
|
||||
|
|
@ -4,10 +4,10 @@
|
|||
import React, {Component} from 'react';
|
||||
import {Scene, Router} from 'react-native-router-flux';
|
||||
|
||||
import LoginContainer from 'containers/login_container';
|
||||
import SelectServerContainer from 'containers/select_server_container';
|
||||
import SelectTeamContainer from 'containers/select_team_container';
|
||||
import MainContainer from 'containers/main_container.js';
|
||||
import LoginContainer from './login/login_container.js';
|
||||
import SelectServerContainer from './select_server/select_server_container.js';
|
||||
import SelectTeamContainer from './select_team/select_team_container.js';
|
||||
import ChannelContainer from './channel/channel_container.js';
|
||||
import Logout from 'components/logout';
|
||||
import * as logout from 'actions/logout';
|
||||
|
||||
|
|
@ -45,7 +45,7 @@ class Routes extends Component {
|
|||
/>
|
||||
<Scene
|
||||
key='goToMain'
|
||||
component={MainContainer}
|
||||
component={ChannelContainer}
|
||||
hideNavBar={true}
|
||||
/>
|
||||
</Scene>
|
||||
|
|
@ -14,7 +14,7 @@ import logo from 'images/logo.png';
|
|||
|
||||
import {injectIntl, intlShape} from 'react-intl';
|
||||
|
||||
class LoginView extends Component {
|
||||
class Login extends Component {
|
||||
static propTypes = {
|
||||
intl: intlShape.isRequired,
|
||||
clientConfig: PropTypes.object.isRequired,
|
||||
|
|
@ -129,4 +129,4 @@ class LoginView extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
export default injectIntl(LoginView);
|
||||
export default injectIntl(Login);
|
||||
|
|
@ -5,7 +5,7 @@ import {bindActionCreators} from 'redux';
|
|||
import {connect} from 'react-redux';
|
||||
import * as loginActions from 'actions/login';
|
||||
import {getClientConfig} from 'actions/general';
|
||||
import LoginView from 'components/login_view';
|
||||
import Login from './login.js';
|
||||
|
||||
function mapStateToProps(state) {
|
||||
return {
|
||||
|
|
@ -23,4 +23,4 @@ function mapDispatchToProps(dispatch) {
|
|||
};
|
||||
}
|
||||
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(LoginView);
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(Login);
|
||||
|
|
@ -17,7 +17,7 @@ import logo from 'images/logo.png';
|
|||
|
||||
import {injectIntl, intlShape} from 'react-intl';
|
||||
|
||||
class SelectServerView extends Component {
|
||||
class SelectServer extends Component {
|
||||
static propTypes = {
|
||||
intl: intlShape.isRequired,
|
||||
ping: React.PropTypes.object.isRequired,
|
||||
|
|
@ -85,4 +85,4 @@ class SelectServerView extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
export default injectIntl(SelectServerView);
|
||||
export default injectIntl(SelectServer);
|
||||
|
|
@ -4,7 +4,7 @@
|
|||
import {bindActionCreators} from 'redux';
|
||||
import {connect} from 'react-redux';
|
||||
import {getPing} from 'actions/general';
|
||||
import SelectServerView from 'components/select_server_view';
|
||||
import SelectServerView from './select_server.js';
|
||||
|
||||
function mapStateToProps(state) {
|
||||
return {
|
||||
|
|
@ -14,7 +14,7 @@ import {GlobalStyles} from 'styles';
|
|||
import logo from 'images/logo.png';
|
||||
import FormattedText from 'components/formatted_text';
|
||||
|
||||
export default class SelectTeamView extends Component {
|
||||
export default class SelectTeam extends Component {
|
||||
static propTypes = {
|
||||
clientConfig: PropTypes.object.isRequired,
|
||||
teams: PropTypes.object.isRequired,
|
||||
|
|
@ -4,7 +4,7 @@
|
|||
import {bindActionCreators} from 'redux';
|
||||
import {connect} from 'react-redux';
|
||||
import * as teamActions from 'actions/teams';
|
||||
import SelectTeamView from 'components/select_team_view';
|
||||
import SelectTeamView from './select_team.js';
|
||||
|
||||
function mapStateToProps(state) {
|
||||
return {
|
||||
Loading…
Reference in a new issue