Commit d0132de5 authored by Thomas's avatar Thomas
Browse files

no message

parent de5e0a51
[{"coordinates": {"latitude": 24.4768783, "longitude": 90.2932426}, "title": "BANGLADESH: 576"}, {"coordinates": {"latitude": 35.000074, "longitude": 104.999927}, "title": "CHINA: 408"}, {"coordinates": {"latitude": 38.9597594, "longitude": 34.9249653}, "title": "TURKEY: 170"}, {"coordinates": {"latitude": 22.3511148, "longitude": 78.6677428}, "title": "INDIA: 163"}, {"coordinates": {"latitude": 42.6384261, "longitude": 12.674297}, "title": "ITALY: 79"}, {"coordinates": {"latitude": 40.0332629, "longitude": -7.8896263}, "title": "PORTUGAL: 67"}, {"coordinates": {"latitude": -2.4833826, "longitude": 117.8902853}, "title": "INDONESIA: 59"}, {"coordinates": {"latitude": 13.2904027, "longitude": 108.4265113}, "title": "VIETNAM: 41"}, {"coordinates": {"latitude": 17.1750495, "longitude": 95.9999652}, "title": "MYANMAR: 41"}, {"coordinates": {"latitude": 30.3308401, "longitude": 71.247499}, "title": "PAKISTAN: 25"}, {"coordinates": {"latitude": 13.5066394, "longitude": 104.869423}, "title": "CAMBODIA: 19"}, {"coordinates": {"latitude": 45.9852129, "longitude": 24.6859225}, "title": "ROMANIA: 18"}, {"coordinates": {"latitude": 46.603354, "longitude": 1.8883335}, "title": "FRANCE: 14"}, {"coordinates": {"latitude": 59.6749712, "longitude": 14.5208584}, "title": "SWEDEN: 13"}, {"coordinates": {"latitude": 51.0834196, "longitude": 10.4234469}, "title": "GERMANY: 10"}, {"coordinates": {"latitude": 10.2116702, "longitude": 38.6521203}, "title": "ETHIOPIA: 9"}, {"coordinates": {"latitude": 52.215933, "longitude": 19.134422}, "title": "POLAND: 8"}, {"coordinates": {"latitude": 39.3260685, "longitude": -4.8379791}, "title": "SPAIN: 7"}, {"coordinates": {"latitude": 7.5554942, "longitude": 80.7137847}, "title": "SRI LANKA: 6"}, {"coordinates": {"latitude": 42.6073975, "longitude": 25.4856617}, "title": "BULGARIA: 6"}, {"coordinates": {"latitude": 36.638392, "longitude": 127.6961188}, "title": "SOUTH KOREA: 4"}, {"coordinates": {"latitude": 31.1728205, "longitude": -7.3362482}, "title": "MOROCCO: 4"}, {"coordinates": {"latitude": 63.2467777, "longitude": 25.9209164}, "title": "FINLAND: 3"}, {"coordinates": {"latitude": 55.3500003, "longitude": 23.7499997}, "title": "LITHUANIA: 3"}, {"coordinates": {"latitude": 49.8167003, "longitude": 15.4749544}, "title": "CZECH REPUBLIC: 3"}, {"coordinates": {"latitude": 58.7523778, "longitude": 25.3319078}, "title": "ESTONIA: 3"}, {"coordinates": {"latitude": 54.7023545, "longitude": -3.2765753}, "title": "GREAT BRITAIN: 2"}, {"coordinates": {"latitude": 55.670249, "longitude": 10.3333283}, "title": "DENMARK: 2"}, {"coordinates": {"latitude": 38.9953683, "longitude": 21.9877132}, "title": "GREECE: 2"}, {"coordinates": {"latitude": 47.1817585, "longitude": 19.5060937}, "title": "HUNGARY: 2"}, {"coordinates": {"latitude": 14.8971921, "longitude": 100.83273}, "title": "THAILAND: 2"}, {"coordinates": {"latitude": 39.7837304, "longitude": -100.4458825}, "title": "USA: 2"}, {"coordinates": {"latitude": 22.2793278, "longitude": 114.1628131}, "title": "HONG KONG: 1"}, {"coordinates": {"latitude": 45.5643442, "longitude": 17.0118954}, "title": "CROATIA: 1"}, {"coordinates": {"latitude": 32.3293809, "longitude": -83.1137366}, "title": "GEORGIA: 1"}, {"coordinates": {"latitude": 44.1534121, "longitude": 20.55144}, "title": "SERBIA: 1"}, {"coordinates": {"latitude": 56.8406494, "longitude": 24.7537645}, "title": "LATVIA: 1"}, {"coordinates": {"latitude": 49.8158683, "longitude": 6.1296751}, "title": "LUXEMBOURG: 1"}, {"coordinates": {"latitude": 1.4419683, "longitude": 38.4313975}, "title": "KENYA: 1"}, {"coordinates": {"latitude": 52.5001698, "longitude": 5.7480821}, "title": "NETHERLANDS: 1"}]
\ No newline at end of file
......@@ -22,7 +22,8 @@ const Card = (props) => {
Score:props.Score,
Logo: props.Logo,
Summary: props.Summary,
Updated: props.Updated
Updated: props.Updated,
Markers: props.Markers
})}>
<View style={style.cardStyle}>
......
......@@ -8,6 +8,7 @@ import { Marker } from 'react-native-maps';
import { Overlay } from 'react-native-elements';
import { showMessage, hideMessage } from "react-native-flash-message";
import FlashMessage from "react-native-flash-message";
import firebase from 'firebase/app';
export default function BrandScreen({ navigation, route }) {
......@@ -18,7 +19,7 @@ export default function BrandScreen({ navigation, route }) {
try {
const result = await Share.share({
message:
'TraCloSo | Building towards a better future for clothing. \nTake a look at: https://google.com',
'TraCloSo | Building towards a better future for clothing. \n\nTake a look at: https://tracloso.com',
});
if (result.action === Share.sharedAction) {
if (result.activityType) {
......@@ -87,6 +88,7 @@ export default function BrandScreen({ navigation, route }) {
const [favoriteBrands, setFavoriteBrands] = React.useState({})
// see if brand is in favorite, if so setFavorite to true
useEffect(() => {
AsyncStorage.getItem('brands', (err, result) => {
if (result !== null) {
......@@ -100,7 +102,9 @@ export default function BrandScreen({ navigation, route }) {
}
})
})
const markers = require('../assets/dataHM.json')
return(
<SafeAreaView style={style.Container}>
{/*header */}
......@@ -150,12 +154,22 @@ export default function BrandScreen({ navigation, route }) {
More info about how the score is calculated? Take a look at our information page</Text>
{/*facilities*/}
<Text style={[style.header, {paddingTop:15}]}>Facilities</Text>
<Text>Click at one of the markers to see how much factories {BrandName} has in that country</Text>
<View style={style.mapview}>
<MapView
style={style.Map}>
<Marker
coordinate={{ latitude : 104.999927 , longitude : 35.000074 }}
/>
<MapView style={style.Map}
initialRegion={{
latitude: 35.3260685,
longitude: 11.77832031,
latitudeDelta: 90,
longitudeDelta: 90,
}}>
{markers.map((item, index) => (
<Marker
key={index}
coordinate={item.coordinates}
title={item.title}
/>
))}
</MapView>
<TouchableOpacity style={style.ExpandIcon} onPress={toggleOverlay}>
<MaterialCommunityIcons name='arrow-expand-all' size={25}/>
......@@ -170,10 +184,20 @@ export default function BrandScreen({ navigation, route }) {
backdropStyle={style.BackDrop}
overlayStyle={style.OverlayStyle} >
<View>
<MapView style={style.Zoom}>
<Marker
coordinate={{ latitude : 37.78825 , longitude : -122.4324 }}
/>
<MapView style={style.Zoom}
initialRegion={{
latitude: 35.3260685,
longitude: 11.77832031,
latitudeDelta: 90,
longitudeDelta: 90,
}}>
{markers.map((item, index) => (
<Marker
key={index}
coordinate={item.coordinates}
title={item.title}
/>
))}
</MapView>
<TouchableOpacity style={style.CloseIcon} onPress={toggleOverlay}>
<MaterialCommunityIcons name='close' size={25} color={'red'}/>
......
......@@ -102,6 +102,7 @@ export default function Home({ navigation }) {
Logo = {item.brand_logo}
Summary = {item.brand_summary}
Updated = {item.updated_at}
Markers = {item.brand_facilities}
/>
);
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment