-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #299 from backbonelabs/how-to-video
How to video
- Loading branch information
Showing
11 changed files
with
163 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
import React, { PropTypes } from 'react'; | ||
import { WebView, View } from 'react-native'; | ||
import BodyText from '../../components/BodyText'; | ||
import Button from '../../components/Button'; | ||
import Spinner from '../../components/Spinner'; | ||
import styles from '../../styles/onBoarding/device'; | ||
import HeadingText from '../../components/HeadingText'; | ||
|
||
import routes from '../../routes'; | ||
|
||
const showSpinner = () => <Spinner />; | ||
const showErrorMessage = () => ( | ||
<BodyText>An error has occur, Please try again later</BodyText> | ||
); | ||
|
||
const HowToVideo = (props) => ( | ||
<View key={props.key} style={styles.container}> | ||
<View style={styles.headerTextContainer}> | ||
<HeadingText size={2}>Tutorial</HeadingText> | ||
</View> | ||
{props.step === 2 ? <WebView | ||
source={{ | ||
uri: 'https://www.youtube.com/embed/Uo27rJAjriw?rel=0&autoplay=0&showinfo=0&controls=0' }} | ||
javaScriptEnabled | ||
startInLoadingState | ||
renderLoading={showSpinner} | ||
renderError={showErrorMessage} | ||
/> : null} | ||
<View style={styles.buttonContainer}> | ||
<Button | ||
primary | ||
style={styles._button} | ||
text="DONE" | ||
onPress={() => props.navigator.replace(routes.postureDashboard)} | ||
/> | ||
<View style={{ paddingTop: 15 }}> | ||
<Button | ||
style={styles._button} | ||
text="BACK" | ||
onPress={props.previousStep} | ||
/> | ||
</View> | ||
</View> | ||
</View> | ||
); | ||
|
||
HowToVideo.propTypes = { | ||
key: PropTypes.number, | ||
step: PropTypes.number, | ||
navigator: PropTypes.shape({ | ||
replace: PropTypes.func, | ||
}), | ||
previousStep: PropTypes.func, | ||
}; | ||
|
||
export default HowToVideo; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
import Profile from './Profile'; | ||
import Device from './Device'; | ||
import HowToVideo from './HowToVideo'; | ||
|
||
export default [Profile, Device]; | ||
export default [Profile, Device, HowToVideo]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters