Skip to content

Commit

Permalink
Upgrade to expo 21
Browse files Browse the repository at this point in the history
  • Loading branch information
sAleksovski committed Oct 11, 2017
1 parent a5ff5ff commit 3cf0e50
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 25 deletions.
2 changes: 1 addition & 1 deletion .babelrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"presets": ["babel-preset-exponent"],
"presets": ["babel-preset-expo"],
"env": {
"development": {
"plugins": ["transform-react-jsx-source"]
Expand Down
8 changes: 4 additions & 4 deletions exp.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@
"description": "An empty new project",
"slug": "nike-plus-running",
"privacy": "public",
"sdkVersion": "12.0.0",
"sdkVersion": "21.0.0",
"version": "1.0.0",
"orientation": "portrait",
"primaryColor": "#cccccc",
"iconUrl": "https://s3.amazonaws.com/exp-brand-assets/ExponentEmptyManifest_192.png",
"icon": "https://s3.amazonaws.com/exp-brand-assets/ExponentEmptyManifest_192.png",
"notification": {
"iconUrl": "https://s3.amazonaws.com/exp-us-standard/placeholder-push-icon-blue-circle.png",
"icon": "https://s3.amazonaws.com/exp-us-standard/placeholder-push-icon-blue-circle.png",
"color": "#000000"
},
"loading": {
"iconUrl": "https://s3.amazonaws.com/exp-brand-assets/ExponentEmptyManifest_192.png",
"icon": "https://s3.amazonaws.com/exp-brand-assets/ExponentEmptyManifest_192.png",
"hideExponentText": false
},
"packagerOpts": {
Expand Down
8 changes: 4 additions & 4 deletions main.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import Exponent from 'exponent';
import Exponent from 'expo';
import React from 'react';
import {
StyleSheet,
Text,
View,
} from 'react-native';

import { Font, Components } from 'exponent';
import { Font, AppLoading } from 'expo';

import SplashScreen from './src/components/SplashScreen';
import HomeScreen from './src/components/HomeScreen';
Expand All @@ -19,7 +19,7 @@ import {
NavigationProvider,
StackNavigation,
NavigationStyles
} from '@exponent/ex-navigation';
} from '@expo/ex-navigation';

const Router = createRouter(() => ({
splash: () => SplashScreen,
Expand Down Expand Up @@ -48,7 +48,7 @@ class App extends React.Component {

render() {
if (!this.state.fontLoaded) {
return <Components.AppLoading />;
return <AppLoading />;
}

return (
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
"private": true,
"main": "main.js",
"dependencies": {
"@exponent/ex-navigation": "^2.7.0",
"@exponent/vector-icons": "~2.0.3",
"exponent": "~12.0.3",
"react": "~15.3.2",
"react-native": "git+https://github.com/exponentjs/react-native#sdk-12.0.0"
"@expo/ex-navigation": "^3.1.0",
"@expo/vector-icons": "^5.2.0",
"expo": "^21.0.0",
"react": "16.0.0-alpha.12",
"react-native": "https://github.com/expo/react-native/archive/sdk-21.0.2.tar.gz"
}
}
4 changes: 2 additions & 2 deletions src/components/BeginRunScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
ScrollView,
TouchableOpacity
} from 'react-native';
import { Components } from 'exponent';
import { LinearGradient } from 'expo';
import FadedZoom from '../animations/FadedZoom';

class BeginRunScreen extends React.Component {
Expand Down Expand Up @@ -53,7 +53,7 @@ class BeginRunScreen extends React.Component {
</View>
<ScrollView>
<View style={styles.mainBar}>
<Components.LinearGradient
<LinearGradient
pointerEvents="none"
colors={['rgba(0,0,0,0.8)', 'rgba(0,0,0,0)', 'rgba(0,0,0,0)', 'rgba(0,0,0,0)', 'rgba(0,0,0,0.8)']}
start={[0, 0]} end={[1, 0]}
Expand Down
6 changes: 3 additions & 3 deletions src/components/HistoryScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
ScrollView,
TouchableOpacity
} from 'react-native';
import { Components } from 'exponent';
import { MapView, LinearGradient } from 'expo';
import FadedZoom from '../animations/FadedZoom';

class HistoryScreen extends React.Component {
Expand Down Expand Up @@ -38,7 +38,7 @@ class HistoryScreen extends React.Component {
</View>
<ScrollView>
<View style={{height: 400, zIndex: 1, marginBottom: 30}}>
<Components.MapView
<MapView
style={{height: 400}}
initialRegion={{
latitude: 37.78825,
Expand All @@ -47,7 +47,7 @@ class HistoryScreen extends React.Component {
longitudeDelta: 0.0421,
}}
/>
<Components.LinearGradient
<LinearGradient
colors={['rgba(255,255,255,0)', 'rgba(255,255,255,0.8)', 'rgba(255,255,255,1)', 'rgba(255,255,255,1)']}
style={{height: 150, position: 'absolute', bottom: 0, left: 0, right: 0}} />
<View style={{height: 150, position: 'absolute', bottom: 0, left: 0, right: 0, paddingHorizontal: 35, paddingTop: 40}}>
Expand Down
7 changes: 3 additions & 4 deletions src/components/HomeScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
Dimensions
} from 'react-native';

import { Components, Location, Permissions } from 'exponent';
import { MapView, LinearGradient, Location, Permissions } from 'expo';
import FadedZoom from '../animations/FadedZoom';
import CardProfile from './CardProfile';
import CardCoach from './CardCoach';
Expand Down Expand Up @@ -180,7 +180,6 @@ class HomeScreen extends React.Component {
render() {
let { pan, scale } = this.state;
let [translateX, translateY] = [pan.x, pan.y];
const {MapView} = Components;
return (
<View style={styles.container}>
<StatusBar
Expand All @@ -202,7 +201,7 @@ class HomeScreen extends React.Component {
</MapView.Marker>
</MapView>
<View style={styles.toolbar}>
<Components.LinearGradient
<LinearGradient
colors={['rgba(255,255,255,1)', 'rgba(255,255,255,0.8)', 'rgba(255,255,255,0)']}
style={{height: 50, position: 'absolute', top: 0, left: 0, right: 0}} />
<View style={{flex: 1, justifyContent: 'center', alignItems: 'center'}}>
Expand Down Expand Up @@ -243,7 +242,7 @@ class HomeScreen extends React.Component {
</Animated.View>
</View>
<View style={styles.footer}>
<Components.LinearGradient
<LinearGradient
pointerEvents="none"
colors={['rgba(255,255,255,0)', 'rgba(255,255,255,0.8)', 'rgba(255,255,255,1)', 'rgba(255,255,255,1)']}
style={{height: 200, position: 'absolute', bottom: 0, left: 0, right: 0}} />
Expand Down
4 changes: 2 additions & 2 deletions src/components/RunningScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
ScrollView,
TouchableOpacity
} from 'react-native';
import { Components } from 'exponent';
import { LinearGradient } from 'expo';
import FadedZoom from '../animations/FadedZoom';

class RunningScreen extends React.Component {
Expand Down Expand Up @@ -66,7 +66,7 @@ class RunningScreen extends React.Component {
</View>
</View>
<View style={styles.graphBar}>
<Components.LinearGradient
<LinearGradient
pointerEvents="none"
colors={['rgba(0,0,0,0.8)', 'rgba(0,0,0,0)', 'rgba(0,0,0,0)', 'rgba(0,0,0,0)']}
start={[0, 0]} end={[1, 0]}
Expand Down

0 comments on commit 3cf0e50

Please sign in to comment.