This repository has been archived by the owner on Sep 20, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
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 #33 from labs13-connect-kids/development
Bring master up to current code base
- Loading branch information
Showing
49 changed files
with
8,193 additions
and
1,233 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"78a98ada1895bfb44ee13d25037303ee2ff5d7ef44ae99b4b673d0d75ecd4d25": true, | ||
"0951b12e98e6e659d3b2fc0ffc4a38132b16545b1296417ab99d2a1617b898bf": true, | ||
"7adc6cdde1172c646f8dda7fcb1186d148e59e6d2a40774bd7e03281a653f19c": true, | ||
"89ed26367cdb9b771858e026f2eb95bfdb90e5ae943e716575327ec325f39c44": true | ||
} |
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,20 @@ | ||
# Title "ADR 1: Introduction of Redux" | ||
|
||
## Context: | ||
|
||
After working with the backend some and developing the parser methods to accomplish our MVP it was discussed amongst the group the need for a global state management system as there | ||
would be multiple areas in the application that would benefit from it. We considered attempting to utilize the Context API or Redux as passing global props through react natives | ||
navigation components was not a feasible option. | ||
|
||
## Decision | ||
|
||
As the entirety of the team is familiar with Redux and this was not the case with the Context Api, we have decided to implement Redux into the project | ||
|
||
## Status | ||
|
||
Accepted. | ||
|
||
## Consequences | ||
|
||
As the application having global state is a project wide alteration, the group mob programmed during the addition of it so all would be familiar with the new flow of the | ||
application. With the global state in place, we can now connect any part of it to any component via the connect HOC, making handling state and props much easier. |
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,94 +1,33 @@ | ||
import React, { Component } from "react"; | ||
import { | ||
createAppContainer, | ||
createDrawerNavigator, | ||
createStackNavigator, | ||
createSwitchNavigator | ||
} from "react-navigation"; | ||
import { StyleSheet } from "react-native"; | ||
import { Button } from "native-base"; | ||
|
||
import BestPracticesScreen from "./src/screens/BestPracticesScreen"; | ||
import FamilyConnectionsScreen from "./src/screens/FamilyConnectionsScreen"; | ||
import PeopleSearchScreen from "./src/screens/PeopleSearchScreen"; | ||
import React, { Component } from 'react'; | ||
import { Provider } from 'react-redux'; | ||
import { store } from './src/store/store'; | ||
import * as Font from 'expo-font'; | ||
import constants from './src/helpers/constants'; | ||
import Navigator from './src/navigation'; | ||
|
||
export default class App extends Component { | ||
state = { fontLoaded: false }; | ||
static navigationOptions = { | ||
drawerLabel: "Notifications", | ||
drawerIcon: () => ( | ||
<View style={styles.authContainer}> | ||
<Button> | ||
<Text>Log In</Text> | ||
</Button> | ||
<Button> | ||
<Text>Sign Up</Text> | ||
</Button> | ||
</View> | ||
) | ||
}; | ||
render() { | ||
return <AppContainer />; | ||
} | ||
} | ||
|
||
const BestPracticeNavigator = createStackNavigator( | ||
{ | ||
BestPractices: { | ||
screen: BestPracticesScreen | ||
} | ||
}, | ||
{ | ||
initialRouteName: "BestPractices" | ||
} | ||
); | ||
const FamilyConnectionsNavigator = createStackNavigator( | ||
{ | ||
FamilyConnections: { | ||
screen: FamilyConnectionsScreen | ||
} | ||
}, | ||
{ | ||
initialRouteName: "FamilyConnections" | ||
} | ||
); | ||
|
||
const PeopleSearchNavigator = createStackNavigator( | ||
{ | ||
PeopleSearch: { | ||
screen: PeopleSearchScreen | ||
contentOptions: { | ||
activeTintColor: constants.highlightColor, | ||
itemsContainerStyle: { | ||
marginVertical: 0 | ||
} | ||
} | ||
}, | ||
{ | ||
initialRouteName: "PeopleSearch" | ||
} | ||
); | ||
}; | ||
|
||
const AppDrawerNavigator = createDrawerNavigator( | ||
{ | ||
"Best Practices": { | ||
screen: BestPracticeNavigator | ||
}, | ||
"Family Connections": { | ||
screen: FamilyConnectionsNavigator | ||
}, | ||
"People Search": { | ||
screen: PeopleSearchNavigator | ||
} | ||
async componentDidMount() { | ||
await Font.loadAsync({ | ||
[constants.fontFamily]: require('./assets/fonts/Futura-Light.otf') | ||
}); | ||
this.setState({ fontLoaded: true }); | ||
} | ||
// To make drawer open on right side uncomment line below | ||
// { drawerPosition: "right" } | ||
); | ||
|
||
const AppSwitchNavigator = createSwitchNavigator({ | ||
BestPractices: { screen: AppDrawerNavigator }, | ||
FamilyConnections: { screen: AppDrawerNavigator }, | ||
PeopleSearch: { screen: AppDrawerNavigator } | ||
}); | ||
|
||
const styles = StyleSheet.create({ | ||
authContainer: { | ||
flexDirection: "row" | ||
render() { | ||
return this.state.fontLoaded ? ( | ||
<Provider store={store}> | ||
<Navigator /> | ||
</Provider> | ||
) : null; | ||
} | ||
}); | ||
|
||
const AppContainer = createAppContainer(AppSwitchNavigator); | ||
} |
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
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,20 @@ | ||
import React from 'react'; | ||
import { Text, StyleSheet } from 'react-native'; | ||
|
||
const CustomText = props => { | ||
// by spreading props and styles in an array, we can pass it custom styles to override or add to these base styles when we use this component | ||
return ( | ||
<Text {...props} style={[styles.mainText, { ...props.style }]}> | ||
{props.children} | ||
</Text> | ||
); | ||
}; | ||
|
||
const styles = StyleSheet.create({ | ||
mainText: { | ||
color: '#0f0f0f', | ||
backgroundColor: 'transparent' | ||
} | ||
}); | ||
|
||
export default CustomText; |
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,102 @@ | ||
import React from 'react'; | ||
import { | ||
Text, | ||
TouchableOpacity, | ||
View, | ||
StyleSheet, | ||
Linking, | ||
Dimensions | ||
} from 'react-native'; | ||
import { Button } from 'native-base'; | ||
import constants from '../../helpers/constants'; | ||
|
||
const SocialWorkerModal = props => { | ||
return ( | ||
<> | ||
<View style={styles.headerContainer}> | ||
<Text style={styles.modalHeaderStyle}> | ||
Do you work with foster kids? | ||
</Text> | ||
<TouchableOpacity | ||
style={styles.close} | ||
onPress={() => { | ||
props.setModalVisible(!props.modalVisible); | ||
}} | ||
> | ||
<Text style={[styles.btnText, styles.closeBtn]}>X</Text> | ||
</TouchableOpacity> | ||
</View> | ||
<Text style={styles.modalTextStyle}> | ||
People Search is for social workers and those that work directly with | ||
foster kids. If you do not work with foster kids, we'd love to tell you | ||
more about what we do. | ||
</Text> | ||
<View style={styles.buttonContainer}> | ||
<Button style={styles.yesButton} block onPress={props.advanceModal}> | ||
<Text style={styles.btnText}>Yes, I work with foster kids</Text> | ||
</Button> | ||
<Button | ||
style={styles.noButton} | ||
block | ||
onPress={() => { | ||
Linking.openURL('https://connectourkids.org'); | ||
}} | ||
> | ||
<Text style={styles.btnText}>Nope, that's not me</Text> | ||
</Button> | ||
</View> | ||
</> | ||
); | ||
}; | ||
|
||
const styles = StyleSheet.create({ | ||
headerContainer: { | ||
borderBottomColor: constants.highlightColor, | ||
borderBottomWidth: 1, | ||
paddingBottom: 20, | ||
paddingHorizontal: 20, | ||
marginVertical: 20, | ||
justifyContent: 'center', | ||
alignItems: 'baseline', | ||
flexDirection: 'row', | ||
width: Dimensions.get('window').width | ||
}, | ||
yesButton: { | ||
backgroundColor: constants.highlightColor, | ||
marginBottom: 10 | ||
}, | ||
noButton: { | ||
backgroundColor: '#6C757D', | ||
marginBottom: 10 | ||
}, | ||
close: { | ||
backgroundColor: 'red', | ||
borderRadius: 3, | ||
marginLeft: 'auto' | ||
}, | ||
closeBtn: { | ||
padding: 5 | ||
}, | ||
btnText: { | ||
color: '#fff' | ||
}, | ||
modalHeaderStyle: { | ||
color: constants.highlightColor, | ||
fontSize: 20, | ||
fontFamily: constants.fontFamily | ||
}, | ||
modalTextStyle: { | ||
fontFamily: constants.fontFamily, | ||
paddingHorizontal: 20, | ||
fontSize: 18, | ||
lineHeight: 25 | ||
}, | ||
buttonContainer: { | ||
padding: 20, | ||
borderTopColor: constants.highlightColor, | ||
borderTopWidth: 1, | ||
marginTop: 20 | ||
} | ||
}); | ||
|
||
export default SocialWorkerModal; |
Oops, something went wrong.