Commit de5e0a51 authored by Thomas's avatar Thomas
Browse files

no message

parent 8a9e3d69
{
"expo": {
"name": "TracloSo",
"slug": "TracloSo",
"name": "TraCloSo",
"slug": "TraCloSo",
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/icon.png",
......@@ -17,13 +17,17 @@
"**/*"
],
"ios": {
"supportsTablet": true
"supportsTablet": true,
"bundleIdentifier": "com.tracloso.traclo",
"buildNumber": "1.0.0"
},
"android": {
"adaptiveIcon": {
"foregroundImage": "./assets/icon.png",
"backgroundColor": "#A5D6AA"
}
},
"package": "com.tracloso.traclo",
"versionCode": 1
},
"web": {
"favicon": "./assets/favicon.png"
......
......@@ -20,11 +20,12 @@ export default function About({navigation}) {
<View style={style.content}>
<Text style={style.title}>Who are we?</Text>
<Text>
"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in oluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
We are a young team of students studying Information Science. We have developed this app for our introductory project. After the project we developed the app further into the current form. We chose such kind of app, because we all are self-conscious about sustainability and think we could force the fashion industry towards being more sustainable.
</Text>
<Text style={[style.title, {paddingTop:15}]}>What is our mission?</Text>
<Text>
"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in oluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
We want to change the fashion industry. The way we challenge the fashion industry is by providing transparency about the origin of the clothing. Knowing where your clothes are made, and no more bad working conditions. Want to use our app to help? {"\n"} {"\n"}
Our mission is to show and indicate the transparency about the origin of the clothes of clothing brands. This is done by researching the origin of the clothing. Close cooperation with the companies by doing interviews with brands and NGOs uncovers unknown information. Our purpose is to create a better world, where customers and society are aware of where and how their clothes are made. Also, where companies and brands are encouraged and steered to improve the environment and the working conditions of the laborers and to be more transparent. And last but not least, where improved sustainability is of importance.
</Text>
</View>
</SafeAreaView>
......
import * as React from 'react';
import {useState} from 'react';
import { SafeAreaView, Platform, StyleSheet, Share,
import {useEffect, useState} from 'react';
import { SafeAreaView, Platform, StyleSheet, Share, AsyncStorage,
TouchableOpacity, Text, View, Image, Dimensions, ScrollView } from 'react-native';
import { MaterialCommunityIcons } from '@expo/vector-icons';
import MapView from 'react-native-maps';
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";
......@@ -70,8 +71,36 @@ export default function BrandScreen({ navigation, route }) {
color: 'black',
duration: 900
});
let FavoritesInformation = {
BrandName: BrandName,
Logo: Logo,
Score: Score,
Summary: Summary,
Updated: Updated
}
AsyncStorage.setItem(
'brands',
JSON.stringify(FavoritesInformation))
}
const [favoriteBrands, setFavoriteBrands] = React.useState({})
useEffect(() => {
AsyncStorage.getItem('brands', (err, result) => {
if (result !== null) {
result = JSON.parse(result)
setFavoriteBrands(result)
if (favoriteBrands.BrandName !== null ) {
if (BrandName == favoriteBrands.BrandName) {
setFavorite(true)
}
}
}
})
})
return(
<SafeAreaView style={style.Container}>
{/*header */}
......@@ -122,7 +151,12 @@ export default function BrandScreen({ navigation, route }) {
{/*facilities*/}
<Text style={[style.header, {paddingTop:15}]}>Facilities</Text>
<View style={style.mapview}>
<MapView style={style.Map}/>
<MapView
style={style.Map}>
<Marker
coordinate={{ latitude : 104.999927 , longitude : 35.000074 }}
/>
</MapView>
<TouchableOpacity style={style.ExpandIcon} onPress={toggleOverlay}>
<MaterialCommunityIcons name='arrow-expand-all' size={25}/>
</TouchableOpacity>
......@@ -136,7 +170,11 @@ export default function BrandScreen({ navigation, route }) {
backdropStyle={style.BackDrop}
overlayStyle={style.OverlayStyle} >
<View>
<MapView style={style.Zoom} />
<MapView style={style.Zoom}>
<Marker
coordinate={{ latitude : 37.78825 , longitude : -122.4324 }}
/>
</MapView>
<TouchableOpacity style={style.CloseIcon} onPress={toggleOverlay}>
<MaterialCommunityIcons name='close' size={25} color={'red'}/>
<Text style={style.CloseText}>Close</Text>
......
......@@ -20,7 +20,7 @@ export default function Contact( {navigation}) {
<View style={style.Content}>
<View style={style.Row}>
<Icon name='phone' size={25} />
<Text style={style.Space} >+31 6 12345678</Text>
<Text style={style.Space}>+31 030 253 3550</Text>
</View>
<View style={style.Row}>
<Icon name='email' size={25} />
......
import * as React from 'react';
import { StyleSheet, Text, View } from 'react-native';
import { StyleSheet, Text, View, AsyncStorage, FlatList } from 'react-native';
import { NavigationContainer } from '@react-navigation/native';
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
import { MaterialCommunityIcons } from '@expo/vector-icons';
import { SafeAreaView } from 'react-native-safe-area-context';
import HeaderComponent from '../components/Header';
import firebase from 'firebase/app';
import Card from '../components/Card'
export default function Favorites() {
const [
......@@ -12,13 +14,106 @@ export default function Favorites() {
setSelectedIndex
] = React.useState(0);
const [filteredDataSourceAZ, setFilteredDataSourceAZ] = React.useState([]);
const [masterDataSourceAZ, setMasterDataSourceAZ] = React.useState([]);
const [search, setSearch] = React.useState('');
const searchFilterFunction = (text) => {
// search function for A-Z
if (text) {
// Inserted text is not blank
// Filter the masterDataSource
// Update FilteredDataSource
const newData = masterDataSourceAZ.filter(function (item) {
const itemData = item.brand_name
? item.brand_name.toUpperCase()
: ''.toUpperCase();
const textData = text.toUpperCase();
return itemData.indexOf(textData) > -1;
});
setFilteredDataSourceAZ(newData);
setSearch(text);
} else {
// Inserted text is blank
// Update FilteredDataSource with masterDataSource
setFilteredDataSourceAZ([]);
setSearch(text);
}
}
let renderCard = ({ item }) => {
return(
<Card
BrandName = {item.brand_name}
Score = {item.brand_score}
Logo = {item.brand_logo}
Summary = {item.brand_summary}
Updated = {item.updated_at}
/>
);
};
const firebaseConfig = {
apiKey: "AIzaSyDUlK-IJcotasPrL9WUqCO1Z86JufUNwJE",
authDomain: "tracloso.firebaseapp.com",
databaseURL: "https://tracloso-default-rtdb.europe-west1.firebasedatabase.app",
projectId: "tracloso",
storageBucket: "tracloso.appspot.com",
messagingSenderId: "174173890413",
appId: "1:174173890413:web:0df0a89c1472cb3cff1c64",
measurementId: "G-EVHYYE4775"
};
if (firebase.apps.length === 0) {
firebase.initializeApp(firebaseConfig)
}
// retieving A-Z
React.useEffect(() => {
//retrieve record from firebase database
firebase.firestore().collection('Brand').orderBy('brand_name').get().then((querySnapshot) => {
let temp = []
querySnapshot.forEach(snapshot => {
let brandDetails = {};
brandDetails = snapshot.data();
temp.push(brandDetails);
setMasterDataSourceAZ(temp);
});
});
}, []);
const [favoriteItems, setFavoriteItems] = React.useState({})
AsyncStorage.getItem('brands', (err, result) => {
result = JSON.parse(result)
setFavoriteItems(result)
});
return (
<SafeAreaView style={style.container}>
<HeaderComponent
selectedIndex={selectedIndex}
setSelectedIndex={setSelectedIndex}
selectedIndex={selectedIndex}
setSelectedIndex={setSelectedIndex}
onChangeText={(text) => searchFilterFunction(text)}
value={search}
/>
<Card
BrandName={favoriteItems.BrandName}
Logo={favoriteItems.Logo}
Score={favoriteItems.Score}
Summary={favoriteItems.Summary}
Updated={favoriteItems.Updated}
/>
<FlatList
data={filteredDataSourceAZ}
keyExtractor={(item, index) => index.toString()}
renderItem = {renderCard}
/>
</SafeAreaView>
);
......
......@@ -20,7 +20,8 @@ export default function Information({navigation}) {
{/*question 1*/}
<Text style={style.title}>How did we get the information?</Text>
<Text>
"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in oluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
The information we are giving, is gathered by doing research. This research exists out of interviews done with clothing brands, stores or agents that have information about the origin of clothes. Moreover, we are in close cooperation with companies like us. Together we could better influence the fashion industry towards a sustainable industry.
Furthermore, we have taken the claims of the brands self and searched for any information supporting those claims. {"\n"}The results of the research are presented in an insightful way in this app!
</Text>
{/*question 2*/}
<Text style={[style.title, {paddingTop:15}]}>What does the score mean?</Text>
......
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