Skip to content

Commit

Permalink
update to RN 22
Browse files Browse the repository at this point in the history
  • Loading branch information
bartonhammond committed Mar 22, 2016
1 parent 7f3c7f1 commit 0bc1553
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 72 deletions.
26 changes: 13 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "snowflake",
"version": "0.0.12",
"version": "0.0.13",
"private": true,
"jest": {
"scriptPreprocessor": "jestSupport/scriptPreprocess.js",
Expand Down Expand Up @@ -47,27 +47,27 @@
"apsl-react-native-button": "git+https://[email protected]/bartonhammond/react-native-button.git",
"immutable": "^3.7.6",
"key-mirror": "^1.0.1",
"react-native": "^0.18.1",
"react-native": "^0.22.2",
"react-native-gifted-spinner": "0.0.3",
"react-native-navbar": "^1.2.1",
"react-native-router-flux": "^2.3.1",
"react-native-navbar": "^1.4.0",
"react-native-router-flux": "^3.1.5",
"react-native-simple-store": "^0.1.0",
"react-native-simpledialog-android": "^1.0.2",
"react-native-vector-icons": "^1.1.0",
"react-redux": "^4.1.1",
"redux": "^3.1.2",
"redux-thunk": "^1.0.3",
"react-native-simpledialog-android": "^1.0.3",
"react-native-vector-icons": "^1.3.2",
"react-redux": "^4.4.1",
"redux": "^3.3.1",
"redux-thunk": "^2.0.1",
"regenerator": "^0.8.42",
"tcomb-form-native": "^0.3.3",
"tcomb-form-native": "^0.4.0",
"underscore": "^1.8.3",
"validate.js": "^0.9.0"
},
"devDependencies": {
"babel-core": "^6.4.5",
"babel-jest": "^6.0.1",
"babel-core": "^6.7.2",
"babel-jest": "^9.0.3",
"docker": "^0.2.14",
"istanbul": "^0.4.2",
"jest-cli": "^0.8.2",
"jest-cli": "^0.9.2",
"react": "^0.14.7",
"react-addons-test-utils": "^0.14.7"
}
Expand Down
102 changes: 43 additions & 59 deletions src/snowflake.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import React, {
*/
import RNRF, {
Route,
Schema,
Scene,
TabBar} from 'react-native-router-flux';

/**
Expand Down Expand Up @@ -90,7 +90,7 @@ import profileInitialState from './reducers/profile/profileInitialState';
/**
* The version of the app but not displayed yet
*/
var VERSION='0.0.12';
var VERSION='0.0.13';

/**
*
Expand All @@ -112,16 +112,16 @@ function getInitialState() {
*
* Displays the icon for the tab w/ color dependent upon selection
*/
class TabIcon extends React.Component {
render() {
var color = this.props.selected ? 'FF3366' : 'FFB3B3';

class TabIcon extends React.Component {
render(){
var color = this.props.selected ? '#FF3366' : '#FFB3B3';
return (
<View style={{flex:1, flexDirection:'column', alignItems:'center', alignSelf:'center'}}>
<Icon style={{color: color}} name={this.props.iconName} size={30} />
<Text style={{color: color}}>{this.props.title}</Text>
</View>
);
<Icon style={{color: color}} name={this.props.iconName} size={30} />
<Text style={{color: color}}>{this.props.title}</Text>
</View>
);
}
}

Expand Down Expand Up @@ -154,71 +154,55 @@ export default function native(platform) {
return (
<Provider store={store}>
<Router hideNavBar={true}>
<Schema name="modal"
sceneConfig={Navigator.SceneConfigs.FloatFromBottom}/>

<Schema name="floatFromRight"
sceneConfig={Navigator.SceneConfigs.FloatFromRight}/>

<Schema name="default"/>

<Schema name="tab"
type="switch"
icon={TabIcon} />

<Route name="App"
component={App}
title="App"
initial={true}/>

<Route name="Login"
component={Login}
title="Login"
type="replace"/>

<Route name="Register"
component={Register}
title="Register"
type="replace"/>

<Route name="ForgotPassword"
component={ForgotPassword}
title="ForgotPassword"
type="replace" />

<Route name="Subview"
component={Subview}
title="Subview"
Schema="floatFromRight" />

<Route name="Tabbar" type="replace">
<Router footer={TabBar}
showNavigationBar={false}>

<Route name="Logout"
schema="tab"
<Scene key="root">
<Scene key="App"
component={App}
title="App"
initial={true}/>

<Scene key="Login"
component={Login}
title="Login"
type="replace"/>

<Scene key="Register"
component={Register}
title="Register"
type="replace"/>

<Scene key="ForgotPassword"
component={ForgotPassword}
title="ForgotPassword"
type="replace" />

<Scene key="Subview"
component={Subview}
title="Subview"/>

<Scene key="Tabbar" tabs={true} default="Main">
<Scene key="Logout"
title="logout"
icon={TabIcon}
iconName={"sign-out"}
hideNavBar={true}
component={Logout}/>

<Route name="Main"
schema="tab"
<Scene key="Main"
title="main"
iconName={"home"}
icon={TabIcon}
hideNavBar={true}
component={Main}
initial={true}/>

<Route name="Profile"
schema="tab"
<Scene key="Profile"
title="profile"
icon={TabIcon}
iconName={"gear"}
hideNavBar={true}
component={Profile}/>
</Router>
</Route>

</Scene>
</Scene>
</Router>
</Provider>
);
Expand Down

0 comments on commit 0bc1553

Please sign in to comment.