Compare commits
No commits in common. "2e4fa2089564ddbf9447d0b5e5d937197b23e2d8" and "71f39a64cc103d948131c3d36bf2891edb115ed8" have entirely different histories.
2e4fa20895
...
71f39a64cc
7 changed files with 19 additions and 57 deletions
|
|
@ -32,6 +32,7 @@ class AuthenticatedScreen extends React.Component<Props, State> {
|
|||
this.props.navigation.addListener('focus', this.onScreenFocus);
|
||||
this.fetchedData = new Array(this.props.links.length);
|
||||
this.errors = new Array(this.props.links.length);
|
||||
this.fetchData(); // TODO remove in prod (only use for fast refresh)
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -236,16 +236,6 @@ function ProfileStackComponent() {
|
|||
};
|
||||
}}
|
||||
/>
|
||||
<ClubStack.Screen
|
||||
name="club-information"
|
||||
component={ClubDisplayScreen}
|
||||
options={({navigation}) => {
|
||||
return {
|
||||
title: i18n.t('screens.clubDisplayScreen'),
|
||||
...TransitionPresets.ModalSlideFromBottomIOS,
|
||||
};
|
||||
}}
|
||||
/>
|
||||
</ProfileStack.Navigator>
|
||||
);
|
||||
}
|
||||
|
|
@ -300,7 +290,7 @@ function ClubStackComponent() {
|
|||
component={ClubDisplayScreen}
|
||||
options={({navigation}) => {
|
||||
return {
|
||||
title: i18n.t('screens.clubDisplayScreen'),
|
||||
title: "",
|
||||
...TransitionPresets.ModalSlideFromBottomIOS,
|
||||
};
|
||||
}}
|
||||
|
|
@ -310,7 +300,7 @@ function ClubStackComponent() {
|
|||
component={ClubAboutScreen}
|
||||
options={({navigation}) => {
|
||||
return {
|
||||
title: i18n.t('screens.about'),
|
||||
title: "ABOUT",
|
||||
...TransitionPresets.ModalSlideFromBottomIOS,
|
||||
};
|
||||
}}
|
||||
|
|
|
|||
|
|
@ -135,7 +135,6 @@ class ClubDisplayScreen extends React.Component<Props, State> {
|
|||
getScreen = (data: Object) => {
|
||||
console.log('fetchedData passed to screen:');
|
||||
console.log(data);
|
||||
console.log("Using fake data");
|
||||
data = FakeClub;
|
||||
this.updateHeaderTitle(data);
|
||||
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ class ProfileScreen extends React.Component<Props, State> {
|
|||
return this.getPersonalCard();
|
||||
case '1':
|
||||
return this.getClubCard();
|
||||
default:
|
||||
case '2':
|
||||
return this.getMembershipCar();
|
||||
}
|
||||
};
|
||||
|
|
@ -164,39 +164,20 @@ class ProfileScreen extends React.Component<Props, State> {
|
|||
);
|
||||
}
|
||||
|
||||
openClubDetailsScreen(id: number) {
|
||||
this.props.navigation.navigate("club-information", {clubId: id});
|
||||
}
|
||||
|
||||
clubListItem = ({item}: Object) => {
|
||||
const onPress = () => this.openClubDetailsScreen(0); // TODO get club id
|
||||
const isManager = false; // TODO detect if manager
|
||||
let description = i18n.t("profileScreen.isMember");
|
||||
let icon = (props) => <List.Icon {...props} icon="chevron-right"/>;
|
||||
if (isManager) {
|
||||
description = i18n.t("profileScreen.isManager");
|
||||
icon = (props) => <List.Icon {...props} icon="star" color={this.colors.primary}/>;
|
||||
}
|
||||
return <List.Item
|
||||
title={item.name}
|
||||
description={description}
|
||||
left={icon}
|
||||
onPress={onPress}
|
||||
/>;
|
||||
};
|
||||
|
||||
clubKeyExtractor = (item: Object) => item.name;
|
||||
|
||||
getClubList(list: Array<string>) {
|
||||
let dataset = [];
|
||||
for (let i = 0; i < list.length; i++) {
|
||||
dataset.push({name: list[i]});
|
||||
}
|
||||
return (
|
||||
//$FlowFixMe
|
||||
<FlatList
|
||||
renderItem={this.clubListItem}
|
||||
keyExtractor={this.clubKeyExtractor}
|
||||
renderItem={({item}) =>
|
||||
<List.Item
|
||||
title={item.name}
|
||||
left={props => <List.Icon {...props} icon="chevron-right"/>}
|
||||
/>
|
||||
}
|
||||
keyExtractor={item => item.name}
|
||||
data={dataset}
|
||||
/>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -53,9 +53,7 @@ const FAKE_TEAMS2 = {
|
|||
],
|
||||
};
|
||||
|
||||
type Props = {
|
||||
navigation: Object
|
||||
}
|
||||
type Props = {}
|
||||
|
||||
type State = {
|
||||
hasVoted: boolean,
|
||||
|
|
@ -137,12 +135,9 @@ export default class VoteScreen extends React.Component<Props, State> {
|
|||
return null;
|
||||
};
|
||||
|
||||
getScreen = (data: Array<Object | null>) => {
|
||||
// data[0] = FAKE_TEAMS2;
|
||||
// data[1] = FAKE_DATE;
|
||||
|
||||
if (data[1] === null)
|
||||
data[1] = {date_begin: null};
|
||||
getScreen = (data: Array<Object>) => {
|
||||
data[0] = FAKE_TEAMS2;
|
||||
data[1] = FAKE_DATE;
|
||||
|
||||
if (data[0] !== null) {
|
||||
this.teams = data[0].teams;
|
||||
|
|
|
|||
|
|
@ -220,10 +220,8 @@
|
|||
"personalInformation": "Personal information",
|
||||
"noData": "No data",
|
||||
"editInformation": "Edit Information",
|
||||
"clubs": "Your clubs",
|
||||
"clubsSubtitle": "Click on a club to show its information",
|
||||
"isMember": "Member",
|
||||
"isManager": "Manager",
|
||||
"clubs": "Clubs",
|
||||
"clubsSubtitle": "Clubs you are part of",
|
||||
"membership": "Membership Fee",
|
||||
"membershipSubtitle": "Allows you to take part in various activities",
|
||||
"membershipPayed": "Payed",
|
||||
|
|
|
|||
|
|
@ -220,10 +220,8 @@
|
|||
"personalInformation": "Informations Personnelles",
|
||||
"noData": "Pas de données",
|
||||
"editInformation": "Modifier les informations",
|
||||
"clubs": "Vos clubs",
|
||||
"clubsSubtitle": "Cliquez sur un club pour afficher ses informations",
|
||||
"isMember": "Membre",
|
||||
"isManager": "Responsable",
|
||||
"clubs": "Clubs",
|
||||
"clubsSubtitle": "Liste de vos clubs",
|
||||
"membership": "Cotisation",
|
||||
"membershipSubtitle": "Permet de participer à diverses activités",
|
||||
"membershipPayed": "Payée",
|
||||
|
|
|
|||
Loading…
Reference in a new issue