-
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 #1 from idonov8/sample-ui
Sample ui
- Loading branch information
Showing
15 changed files
with
157 additions
and
88 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
import React from 'react' | ||
import { Text, View, Image } from 'react-native' | ||
import Button from 'react-native-really-awesome-button/src/themes/rick'; | ||
import { Helpers, Fonts, Images, Metrics } from '../Theme'; | ||
|
||
export default function SampleBody(props) { | ||
const { btnTitle, btnAction, helperText } = props; | ||
|
||
return ( | ||
<View | ||
style={[ | ||
Helpers.fillColCenter, | ||
Helpers.mainSpaceAround | ||
]} | ||
> | ||
<View key="text-view" | ||
style={[ | ||
Helpers.colCenter, | ||
Helpers.mainSpaceAround | ||
]} | ||
> | ||
<Text style={[ | ||
Fonts.h1, | ||
Metrics.bottomMargin | ||
]}> | ||
זהירות קורונה! | ||
</Text> | ||
<Text style={[ | ||
Fonts.h4, | ||
Helpers.textCenter, | ||
Metrics.horizontalPadding | ||
]}> | ||
{ | ||
helperText | ||
} | ||
</Text> | ||
</View> | ||
<Button | ||
width={150} | ||
onPress={btnAction} | ||
> | ||
{btnTitle} | ||
</Button> | ||
<Image source={Images.Location}></Image> | ||
<Text style={[ | ||
Fonts.h4, | ||
Helpers.textCenter, | ||
Metrics.horizontalPadding | ||
]}> | ||
{`תודה על שיתוף הפעולה.\nאם נתקלתם בבאגים או כל בעיה, אנא דווחו לצוות באומן`} | ||
</Text> | ||
</View> | ||
); | ||
} |
This file was deleted.
Oops, something went wrong.
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,49 @@ | ||
import React from 'react' | ||
import { View, Button } from 'react-native' | ||
import { connect } from 'react-redux' | ||
import PropTypes from 'prop-types' | ||
import { Helpers } from 'App/Theme' | ||
import SampleBody from '../../Components/SampleBody' | ||
import SampleActions from '../../Stores/Samples/Actions'; | ||
|
||
class ScanningScreen extends React.Component { | ||
render() { | ||
const { isScanning, startSampling, stopSampling } = this.props; | ||
|
||
const helperText = isScanning ? | ||
'לא לשכוח ללחוץ ביציאה!' : 'לחצו על הכפתור כשאתם נכנסים לבסיס וכשאתם יוצאים\n\nככה נוודא שלא נחשפתם לנגיף' | ||
|
||
return ( | ||
<View | ||
style={[ | ||
Helpers.fillColMain | ||
]} | ||
> | ||
<SampleBody | ||
helperText={helperText} | ||
btnTitle={isScanning ? 'יצאתי': 'נכנסתי'} | ||
btnAction={isScanning ? stopSampling : startSampling}/> | ||
</View> | ||
) | ||
} | ||
} | ||
|
||
ScanningScreen.propTypes = { | ||
isScanning: PropTypes.bool.isRequired, | ||
startSampling: PropTypes.func.isRequired, | ||
stopSampling: PropTypes.func.isRequired, | ||
} | ||
|
||
const mapStateToProps = (state) => ({ | ||
isScanning: state.samples.isSampling, | ||
}) | ||
|
||
const mapDispatchToProps = (dispatch) => ({ | ||
startSampling: () => dispatch(SampleActions.startSample()), | ||
stopSampling: () => dispatch(SampleActions.stopSample()) | ||
}) | ||
|
||
export default connect( | ||
mapStateToProps, | ||
mapDispatchToProps | ||
)(ScanningScreen) |
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 |
---|---|---|
|
@@ -3,4 +3,5 @@ | |
*/ | ||
export const INITIAL_STATE = { | ||
roomId: null, | ||
isSampling: false | ||
} |
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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
# HospiTrack-client | ||
The client app for tracking people, the gathered data will be used for קpidemiological investigations. | ||
The client app for tracking people, the gathered data will be used for epidemiological investigations. |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.