Fix users descriptions not loading

This commit is contained in:
Arnaud Vergnet 2020-09-21 17:47:55 +02:00
parent 2c3f89816b
commit b9e9e03d0a

View file

@ -64,9 +64,14 @@ function openWebLink(link: string) {
} }
/** /**
* Class defining an about screen. This screen shows the user information about the app and it's author.
*/
class AboutScreen extends React.Component<PropsType, StateType> {
/**
* Object containing data relative to major contributors * Object containing data relative to major contributors
*/ */
const majorContributors: {[key: string]: MemberItemType} = { static majorContributors: {[key: string]: MemberItemType} = {
arnaud: { arnaud: {
name: 'Arnaud Vergnet', name: 'Arnaud Vergnet',
message: i18n.t('screens.about.user.arnaud'), message: i18n.t('screens.about.user.arnaud'),
@ -91,12 +96,12 @@ const majorContributors: {[key: string]: MemberItemType} = {
'&body=' + '&body=' +
'Coucou !\n\n', 'Coucou !\n\n',
}, },
}; };
/** /**
* Object containing data relative to users who helped during development * Object containing data relative to users who helped during development
*/ */
const helpfulUsers: {[key: string]: MemberItemType} = { static helpfulUsers: {[key: string]: MemberItemType} = {
beranger: { beranger: {
name: 'Béranger Quintana Y Arciosana', name: 'Béranger Quintana Y Arciosana',
message: i18n.t('screens.about.user.beranger'), message: i18n.t('screens.about.user.beranger'),
@ -122,12 +127,7 @@ const helpfulUsers: {[key: string]: MemberItemType} = {
message: i18n.t('screens.about.user.theo'), message: i18n.t('screens.about.user.theo'),
icon: 'food-apple', icon: 'food-apple',
}, },
}; };
/**
* Class defining an about screen. This screen shows the user information about the app and it's author.
*/
class AboutScreen extends React.Component<PropsType, StateType> {
/** /**
* Data to be displayed in the app card * Data to be displayed in the app card
@ -185,18 +185,18 @@ class AboutScreen extends React.Component<PropsType, StateType> {
teamData: Array<ListItemType> = [ teamData: Array<ListItemType> = [
{ {
onPressCallback: () => { onPressCallback: () => {
this.onContributorListItemPress(majorContributors.arnaud); this.onContributorListItemPress(AboutScreen.majorContributors.arnaud);
}, },
icon: majorContributors.arnaud.icon, icon: AboutScreen.majorContributors.arnaud.icon,
text: majorContributors.arnaud.name, text: AboutScreen.majorContributors.arnaud.name,
showChevron: false, showChevron: false,
}, },
{ {
onPressCallback: () => { onPressCallback: () => {
this.onContributorListItemPress(majorContributors.yohan); this.onContributorListItemPress(AboutScreen.majorContributors.yohan);
}, },
icon: majorContributors.yohan.icon, icon: AboutScreen.majorContributors.yohan.icon,
text: majorContributors.yohan.name, text: AboutScreen.majorContributors.yohan.name,
showChevron: false, showChevron: false,
}, },
{ {
@ -216,42 +216,42 @@ class AboutScreen extends React.Component<PropsType, StateType> {
thanksData: Array<ListItemType> = [ thanksData: Array<ListItemType> = [
{ {
onPressCallback: () => { onPressCallback: () => {
this.onContributorListItemPress(helpfulUsers.beranger); this.onContributorListItemPress(AboutScreen.helpfulUsers.beranger);
}, },
icon: helpfulUsers.beranger.icon, icon: AboutScreen.helpfulUsers.beranger.icon,
text: helpfulUsers.beranger.name, text: AboutScreen.helpfulUsers.beranger.name,
showChevron: false, showChevron: false,
}, },
{ {
onPressCallback: () => { onPressCallback: () => {
this.onContributorListItemPress(helpfulUsers.celine); this.onContributorListItemPress(AboutScreen.helpfulUsers.celine);
}, },
icon: helpfulUsers.celine.icon, icon: AboutScreen.helpfulUsers.celine.icon,
text: helpfulUsers.celine.name, text: AboutScreen.helpfulUsers.celine.name,
showChevron: false, showChevron: false,
}, },
{ {
onPressCallback: () => { onPressCallback: () => {
this.onContributorListItemPress(helpfulUsers.damien); this.onContributorListItemPress(AboutScreen.helpfulUsers.damien);
}, },
icon: helpfulUsers.damien.icon, icon: AboutScreen.helpfulUsers.damien.icon,
text: helpfulUsers.damien.name, text: AboutScreen.helpfulUsers.damien.name,
showChevron: false, showChevron: false,
}, },
{ {
onPressCallback: () => { onPressCallback: () => {
this.onContributorListItemPress(helpfulUsers.titouan); this.onContributorListItemPress(AboutScreen.helpfulUsers.titouan);
}, },
icon: helpfulUsers.titouan.icon, icon: AboutScreen.helpfulUsers.titouan.icon,
text: helpfulUsers.titouan.name, text: AboutScreen.helpfulUsers.titouan.name,
showChevron: false, showChevron: false,
}, },
{ {
onPressCallback: () => { onPressCallback: () => {
this.onContributorListItemPress(helpfulUsers.theo); this.onContributorListItemPress(AboutScreen.helpfulUsers.theo);
}, },
icon: helpfulUsers.theo.icon, icon: AboutScreen.helpfulUsers.theo.icon,
text: helpfulUsers.theo.name, text: AboutScreen.helpfulUsers.theo.name,
showChevron: false, showChevron: false,
}, },
]; ];