diff --git a/assets/jsicons/detailAboutUs/Branch.js b/assets/jsicons/detailAboutUs/Branch.js
new file mode 100644
index 00000000..3f468bf6
--- /dev/null
+++ b/assets/jsicons/detailAboutUs/Branch.js
@@ -0,0 +1,10 @@
+import React from 'react';
+import { SvgXml } from 'react-native-svg';
+
+export default function BranchIcon() {
+ const branchicon = `
+ `;
+ const BranchIcon = () => ;
+
+ return ;
+}
diff --git a/assets/jsicons/detailAboutUs/Handshake.js b/assets/jsicons/detailAboutUs/Handshake.js
new file mode 100644
index 00000000..d3cb7db8
--- /dev/null
+++ b/assets/jsicons/detailAboutUs/Handshake.js
@@ -0,0 +1,12 @@
+import React from 'react';
+import { SvgXml } from 'react-native-svg';
+
+export default function HandshakeIcon() {
+ const handshakeicon = `
+ `;
+ const HandshakeIcon = () => (
+
+ );
+
+ return ;
+}
diff --git a/assets/jsicons/detailAboutUs/Rocket.js b/assets/jsicons/detailAboutUs/Rocket.js
new file mode 100644
index 00000000..a95f6f49
--- /dev/null
+++ b/assets/jsicons/detailAboutUs/Rocket.js
@@ -0,0 +1,10 @@
+import React from 'react';
+import { SvgXml } from 'react-native-svg';
+
+export default function RocketIcon() {
+ const rocketicon = `
+ `;
+ const RocketIcon = () => ;
+
+ return ;
+}
diff --git a/components/Animals/AnimalModal.js b/components/Animals/AnimalModal.js
index 4d97d7de..a81f35c1 100644
--- a/components/Animals/AnimalModal.js
+++ b/components/Animals/AnimalModal.js
@@ -1,4 +1,4 @@
-import React from 'react';
+import React, { Component } from 'react';
import { Modal, View, TouchableOpacity, Text } from 'react-native';
//import icons
@@ -11,10 +11,10 @@ import Animals from '../Animals/Animals';
//import styles
import styles from '../../constants/Animals/AnimalModal';
-const AnimalModal = props => {
+const AnimalModal = (props) => {
return (
props.setIsModalVisible(!props.isModalVisible)}
diff --git a/components/Partners/PartnersModal.js b/components/Partners/PartnersModal.js
new file mode 100644
index 00000000..6efad103
--- /dev/null
+++ b/components/Partners/PartnersModal.js
@@ -0,0 +1,55 @@
+import React, { useState, useEffect } from 'react';
+import { Alert, Modal, View, TouchableOpacity, Text } from 'react-native';
+import BackArrow from '../../assets/jsicons/miscIcons/BackArrow';
+
+import SearchBar from '../../components/Partners/SearchBar';
+
+// For connecting Partners
+import { getConnections } from '../../store/actions';
+
+import styles from '../../constants/Partners/PartnerModal';
+const PartnersModal = (props) => {
+ const [partners, setPartners] = useState([]);
+
+ const getConnections = async () => {
+ try {
+ const partner = await props.getConnections(props.currentUserProfile.id);
+ if (Array.isArray(partner)) setPartners(partner);
+ else throw new Error(partner);
+ } catch (error) {
+ Alert.alert('Failed to get your partners');
+ }
+ };
+
+ useEffect(() => {
+ getConnections();
+ }, []);
+
+ return (
+
+ props.setIsPartnersModalVisible(!props.isPartnersModalVisable)
+ }
+ >
+
+
+
+
+ props.setIsPartnersModalVisible(!props.isPartnersModalVisible)
+ }
+ >
+
+
+
+
+ {/* {props.currentUserProfile.roles === 'conservationists'} */}
+
+
+ );
+};
+
+export default PartnersModal;
diff --git a/components/Partners/SearchBar.js b/components/Partners/SearchBar.js
new file mode 100644
index 00000000..29d22110
--- /dev/null
+++ b/components/Partners/SearchBar.js
@@ -0,0 +1,16 @@
+import React from 'react';
+import { View, TextInput } from 'react-native';
+
+import Search from '../../assets/jsicons/SearchIcon';
+import styles from '../../constants/Partners/SearchBar';
+
+const SearchBar = () => {
+ return (
+
+
+
+
+ );
+};
+
+export default SearchBar;
diff --git a/components/Profile/ProfileBody.js b/components/Profile/ProfileBody.js
index 49828aa9..f1e09899 100644
--- a/components/Profile/ProfileBody.js
+++ b/components/Profile/ProfileBody.js
@@ -8,6 +8,7 @@ import Details from './tabs/Details';
import Campaigns from './tabs/Campaigns';
import Location from './tabs/Location';
+
export default React.forwardRef((props, ref) => {
const routes =
props.profile.roles === 'supporter'
@@ -17,9 +18,11 @@ export default React.forwardRef((props, ref) => {
]
: [
{ key: 'campaigns', title: 'Campaigns' },
- { key: 'details', title: 'Details' }
+ { key: 'details', title: 'Details' },
];
+
+
// If the profile in questions is an organization and has a location,
// insert a tab in index 1 (in the middle as per designs)
if (props.profile.roles === 'conservationist' && props.profile.location) {
@@ -28,12 +31,12 @@ export default React.forwardRef((props, ref) => {
const [state, setState] = useState({
index: 0,
- routes
+ routes,
});
- const handleIndexChange = index => {
+ const handleIndexChange = (index) => {
props.scrollToMaximizeContent(index === state.index);
- setState(prevState => ({ ...prevState, index }));
+ setState((prevState) => ({ ...prevState, index }));
};
const renderTabBar = ({ navigationState }) => {
@@ -42,7 +45,7 @@ export default React.forwardRef((props, ref) => {
const translateY = props.contentPaddingTop
? props.scrollY.interpolate({
inputRange: [0, distance, distance * 2],
- outputRange: [0, 0, distance]
+ outputRange: [0, 0, distance],
})
: 0;
@@ -59,7 +62,7 @@ export default React.forwardRef((props, ref) => {
backgroundColor: 'white',
borderBottomColor: `rgba(0, 255, 157, ${
state.index === i ? 1 : 0
- })`
+ })`,
}}
onPress={() => handleIndexChange(i)}
>
@@ -76,14 +79,14 @@ export default React.forwardRef((props, ref) => {
const renderScene = SceneMap({
campaigns: () => ,
location: () => ,
- details: () =>
+ details: () => ,
});
return (
{
+const Details = (props) => {
+ const { data } = props;
const { profile } = props;
+ const [isPartnersModalVisible, setIsPartnersModalVisible] = useState(false);
+
return (
{profile.roles !== 'supporter' && (
@@ -19,8 +30,69 @@ const Details = props => {
{'About Us'}
{profile.about_us}
-
+
+
+ {'Support Our Mission'}
+
+
+ Donate funds to go towards the overall mission of our conservation
+ organization. Your donation will be used to support our team, our
+ daily activities and research.
+
+ {/* // April 2020: Props needs to pass properly for donate button */}
+ {/*
+
+ */}
+ {/* // April 2020: Projects will be added at a later time */}
+ {/*
+
+
+ {'Projects Within Our Organization'}
+
+
+
+ These projects are directly supported by us and are within our
+ organization. They have their own organization pages so the team
+ on the ground can better share the work they are doing in the
+ field.
+
+
+
+
+ Add a Project
+
+ */}
+
+
+ {'Our Partners'}
+
+
+ These are the organizations that we are currently collaborating
+ with in order to spread awareness and raise the resources needed
+ to achieve our mission.
+
+
+ {/* Code below commented out because by default the modal displays
+ for some reason...working on it. */}
+
+ {/* */}
+ {
+ setIsPartnersModalVisible(true);
+ console.log('plus clicked');
+ }}
+ >
+
+
+ Add a Partner
+
+
+
{/* Species and Habitats is a feature not yet in place */}
{/*
@@ -44,4 +116,8 @@ const Details = props => {
);
};
-export default Details;
+const mapStateToProps = (state) => ({
+ currentUserProfile: state.currentUserProfile,
+});
+
+export default connect(mapStateToProps, {})(Details);
diff --git a/constants/Partners/PartnerModal.js b/constants/Partners/PartnerModal.js
new file mode 100644
index 00000000..db0340a1
--- /dev/null
+++ b/constants/Partners/PartnerModal.js
@@ -0,0 +1,13 @@
+import { StyleSheet, Dimensions } from 'react-native';
+import { responsiveFontSize } from 'react-native-responsive-dimensions';
+
+const styles = StyleSheet.create({
+ modalContainer: {
+ justifyContent: 'center',
+ alignItems: 'center',
+ flex: 1,
+ backgroundColor: 'lightgrey',
+ flexDirection: 'row',
+ },
+});
+export default styles;
diff --git a/constants/Partners/SearchBar.js b/constants/Partners/SearchBar.js
new file mode 100644
index 00000000..8f5b8435
--- /dev/null
+++ b/constants/Partners/SearchBar.js
@@ -0,0 +1,17 @@
+import { StyleSheet } from 'react-native';
+
+const styles = StyleSheet.create({
+ background: {
+ // backgroundColor: '#F0EEEE',
+ backgroundColor: 'darkgrey',
+ height: 50,
+ borderRadius: 5,
+ marginHorizontal: 15,
+ width: '80%',
+ flexDirection: 'row',
+ alignItems: 'center',
+ paddingLeft: 10
+ },
+});
+
+export default styles;
diff --git a/constants/Profile/ProfileBody.js b/constants/Profile/ProfileBody.js
index b03df190..ba7c74ee 100644
--- a/constants/Profile/ProfileBody.js
+++ b/constants/Profile/ProfileBody.js
@@ -2,7 +2,7 @@ import { StyleSheet } from 'react-native';
export default StyleSheet.create({
container: {
- flex: 1
+ flex: 1,
},
tabBar: {
left: 0,
@@ -10,7 +10,7 @@ export default StyleSheet.create({
zIndex: 100,
flexDirection: 'row',
position: 'absolute',
- backgroundColor: 'white'
+ backgroundColor: 'white',
},
tabItem: {
flex: 1,
@@ -18,6 +18,7 @@ export default StyleSheet.create({
color: 'black',
borderBottomWidth: 3,
borderBottomColor: 'white',
- padding: 12
- }
+ paddingHorizontal: 5, // Changed from padding: 12 until get subnav setup
+ paddingVertical: 12,
+ },
});
diff --git a/constants/Profile/tabs/Details.js b/constants/Profile/tabs/Details.js
index 5e91c465..e22f316e 100644
--- a/constants/Profile/tabs/Details.js
+++ b/constants/Profile/tabs/Details.js
@@ -4,7 +4,7 @@ export default StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#F2F2FB',
- paddingHorizontal: 8
+ paddingHorizontal: 8,
},
sections: {
marginTop: 8,
@@ -12,7 +12,7 @@ export default StyleSheet.create({
width: '100%',
padding: 16,
borderRadius: 5,
- fontSize: 15
+ fontSize: 15,
},
SocialContainer: {
flexDirection: 'row',
@@ -22,7 +22,7 @@ export default StyleSheet.create({
paddingBottom: 10,
justifyContent: 'space-around',
position: 'absolute',
- bottom: 0
+ bottom: 0,
},
iconWrap: {
flexWrap: 'wrap',
@@ -31,17 +31,18 @@ export default StyleSheet.create({
borderBottomColor: '#eee',
borderBottomWidth: 1,
marginBottom: 2,
- paddingBottom: 20
+ paddingBottom: 20,
},
title: {
fontSize: 18,
color: '#3B3B3B',
alignSelf: 'center',
paddingLeft: 10,
- fontFamily: 'Lato-Bold'
+ fontFamily: 'Lato-Bold',
},
body: {
marginTop: 10,
+ marginBottom: 30,
flexDirection: 'column',
flexWrap: 'nowrap',
fontSize: 17,
@@ -60,23 +61,79 @@ export default StyleSheet.create({
justifyContent: 'center',
fontSize: 15,
marginTop: 8,
- marginBottom: 8
+ marginBottom: 8,
},
donateTitle: {
fontSize: 18,
textAlign: 'center',
marginLeft: 10,
- fontFamily: 'Lato-Bold'
+ fontFamily: 'Lato-Bold',
},
donateButton: {
- alignItems: 'center',
+ flex: 1,
+ padding: 15,
width: '100%',
- marginTop: 24
+ flexWrap: 'wrap',
+ flexDirection: 'row',
+ alignItems: 'center',
+ justifyContent: 'center',
+ fontSize: 18,
+ },
+ buttonTouch: {
+ width: '95%',
+ height: 48,
+ backgroundColor: '#F5F5F5',
+ alignItems: 'center',
+ justifyContent: 'center',
+ borderRadius: 5,
+ textAlign: 'center',
+ shadowColor: 'rgba(0, 0, 0, 0.15)',
+ shadowOffset: {
+ height: 4,
+ },
+ shadowRadius: 5,
+ shadowOpacity: 10,
},
donateText: {
- marginTop: 10,
- fontSize: 15,
+ color: '#323339',
+ textTransform: 'uppercase',
+ letterSpacing: 1.8,
+ fontSize: 17,
textAlign: 'center',
- fontFamily: 'Lato-Bold'
- }
+ fontFamily: 'Lato-Bold',
+ },
+ // donateButton: {
+ // alignItems: 'center',
+ // width: '100%',
+ // marginTop: 10,
+ // marginBottom: 50,
+ // backgroundColor: 'limegreen',
+ // padding: 10,
+ // borderRadius: 5,
+ // },
+ // donateText: {
+ // fontSize: 25,
+ // textAlign: 'center',
+ // fontFamily: 'Lato-Bold',
+ // textTransform: 'uppercase',
+ // color: '#3b3b3b'
+ // },
+ addProjectsButton: {
+ flexDirection: 'column',
+ alignItems: 'center',
+ justifyContent: 'center',
+ borderRadius: 5,
+ padding: 10,
+ marginBottom: 20,
+ },
+ buttonText: {
+ fontFamily: 'Lato-Bold',
+ color: '#3b3b3b',
+ marginTop: 15,
+ },
+ ProjectPartnerSection: {
+ flexDirection: 'row',
+ justifyContent: 'center',
+ flexWrap: 'wrap',
+ },
});