Skip to content
This repository has been archived by the owner on Sep 20, 2019. It is now read-only.

Commit

Permalink
Merge pull request #33 from labs13-connect-kids/development
Browse files Browse the repository at this point in the history
Bring master up to current code base
  • Loading branch information
blkfltchr authored Jun 21, 2019
2 parents 1a15e69 + aa3e67e commit 368bb63
Show file tree
Hide file tree
Showing 49 changed files with 8,193 additions and 1,233 deletions.
Binary file modified .DS_Store
Binary file not shown.
6 changes: 6 additions & 0 deletions .expo-shared/assets.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"78a98ada1895bfb44ee13d25037303ee2ff5d7ef44ae99b4b673d0d75ecd4d25": true,
"0951b12e98e6e659d3b2fc0ffc4a38132b16545b1296417ab99d2a1617b898bf": true,
"7adc6cdde1172c646f8dda7fcb1186d148e59e6d2a40774bd7e03281a653f19c": true,
"89ed26367cdb9b771858e026f2eb95bfdb90e5ae943e716575327ec325f39c44": true
}
20 changes: 20 additions & 0 deletions ADR1.md
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.
111 changes: 25 additions & 86 deletions App.js
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);
}
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

You can find the repo for the project at [connect our kids repo](https://github.com/labs13-connect-kids/mobile).

## 4️⃣ Contributors
## Contributors

| [Asa Shalom](https://github.com/AsaOfDiamonds) | [Ryan Walker](https://github.com/rytwalker) | [Tyler Spaulding](https://github.com/NightlyD3V) | [Michael (Max) Gunter](https://github.com/maxgunter99) | [Pedro Montesinos](https://github.com/pedrolmr) | [Sean Pheneger](https://github.com/wcolts2000) |
| :----------------------------------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :----------------------------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------------------: |
Expand Down Expand Up @@ -34,13 +34,13 @@ You can find the project repo at [Connect Our Kids RN Repo](https://github.com/l

## Mission Statement

> Our mission is to empower social workers with free modern technology to find permanent loving homes for foster kids
> Our mission is to empower social workers with free modern technology to find permanent loving homes for foster kids.
Social workers who are not familiar with Connect Our Kids will learn about us through their personal connections, social media, emails, and training programs. The social worker will use their browser on their desktop or the mobile phone to learn more at [connectourkids.org](https://connectourkids.org). That user will then click a “download mobile app” button that will drive them to the app store.

Once they’ve downloaded the app, they’ll have basic access to each of the sections of the app (but not full access). They’ll be prompted to login or signup. Once authenticated, they’ll have full access to the People Search features.
Once they’ve downloaded the app, they’ll have basic access to each of the sections of the app (but not full access). At that point, they will be prompted to login or signup. Once authenticated, they’ll have full access to the People Search features.

In the future, the user will have access to full features of Family Connections and Best Practices in the mobile app.
In the future, the registered user will have access to full features of Family Connections and Best Practices in the mobile app.

![](header.png)

Expand Down
14 changes: 4 additions & 10 deletions app.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,21 @@
"slug": "connectOurKids",
"privacy": "public",
"sdkVersion": "33.0.0",
"platforms": [
"ios",
"android",
"web"
],
"platforms": ["ios", "android", "web"],
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/icon.png",
"splash": {
"image": "./assets/splash.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
"backgroundColor": "#fff"
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": [
"**/*"
],
"assetBundlePatterns": ["**/*"],
"ios": {
"supportsTablet": true
}
}
}
}
Binary file added assets/fonts/Futura-Light.otf
Binary file not shown.
Binary file added assets/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/loading.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/simple-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 8 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,19 @@
"dependencies": {
"axios": "^0.19.0",
"expo": "^33.0.0",
"expo-font": "~5.0.1",
"jwt-decode": "^2.2.0",
"native-base": "^2.12.1",
"react": "16.8.3",
"react-dom": "^16.8.6",
"react-native": "https://github.com/expo/react-native/archive/sdk-33.0.0.tar.gz",
"react-native-auth0": "^1.4.2",
"react-native-web": "^0.11.4",
"react-navigation": "^3.11.0"
"react-navigation": "^3.11.0",
"react-redux": "^7.1.0",
"redux": "^4.0.1",
"redux-devtools-extension": "^2.13.8",
"redux-thunk": "^2.3.0"
},
"devDependencies": {
"babel-preset-expo": "^5.1.1"
Expand Down
20 changes: 20 additions & 0 deletions src/UI/CustomText.js
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;
102 changes: 102 additions & 0 deletions src/components/AuthModals/SocialWorkerModal.js
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;
Loading

0 comments on commit 368bb63

Please sign in to comment.