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

@ -63,10 +63,15 @@ function openWebLink(link: string) {
Linking.openURL(link);
}
/**
* 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
*/
const majorContributors: {[key: string]: MemberItemType} = {
static majorContributors: {[key: string]: MemberItemType} = {
arnaud: {
name: 'Arnaud Vergnet',
message: i18n.t('screens.about.user.arnaud'),
@ -96,7 +101,7 @@ const majorContributors: {[key: string]: MemberItemType} = {
/**
* Object containing data relative to users who helped during development
*/
const helpfulUsers: {[key: string]: MemberItemType} = {
static helpfulUsers: {[key: string]: MemberItemType} = {
beranger: {
name: 'Béranger Quintana Y Arciosana',
message: i18n.t('screens.about.user.beranger'),
@ -124,11 +129,6 @@ const helpfulUsers: {[key: string]: MemberItemType} = {
},
};
/**
* 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
*/
@ -185,18 +185,18 @@ class AboutScreen extends React.Component<PropsType, StateType> {
teamData: Array<ListItemType> = [
{
onPressCallback: () => {
this.onContributorListItemPress(majorContributors.arnaud);
this.onContributorListItemPress(AboutScreen.majorContributors.arnaud);
},
icon: majorContributors.arnaud.icon,
text: majorContributors.arnaud.name,
icon: AboutScreen.majorContributors.arnaud.icon,
text: AboutScreen.majorContributors.arnaud.name,
showChevron: false,
},
{
onPressCallback: () => {
this.onContributorListItemPress(majorContributors.yohan);
this.onContributorListItemPress(AboutScreen.majorContributors.yohan);
},
icon: majorContributors.yohan.icon,
text: majorContributors.yohan.name,
icon: AboutScreen.majorContributors.yohan.icon,
text: AboutScreen.majorContributors.yohan.name,
showChevron: false,
},
{
@ -216,42 +216,42 @@ class AboutScreen extends React.Component<PropsType, StateType> {
thanksData: Array<ListItemType> = [
{
onPressCallback: () => {
this.onContributorListItemPress(helpfulUsers.beranger);
this.onContributorListItemPress(AboutScreen.helpfulUsers.beranger);
},
icon: helpfulUsers.beranger.icon,
text: helpfulUsers.beranger.name,
icon: AboutScreen.helpfulUsers.beranger.icon,
text: AboutScreen.helpfulUsers.beranger.name,
showChevron: false,
},
{
onPressCallback: () => {
this.onContributorListItemPress(helpfulUsers.celine);
this.onContributorListItemPress(AboutScreen.helpfulUsers.celine);
},
icon: helpfulUsers.celine.icon,
text: helpfulUsers.celine.name,
icon: AboutScreen.helpfulUsers.celine.icon,
text: AboutScreen.helpfulUsers.celine.name,
showChevron: false,
},
{
onPressCallback: () => {
this.onContributorListItemPress(helpfulUsers.damien);
this.onContributorListItemPress(AboutScreen.helpfulUsers.damien);
},
icon: helpfulUsers.damien.icon,
text: helpfulUsers.damien.name,
icon: AboutScreen.helpfulUsers.damien.icon,
text: AboutScreen.helpfulUsers.damien.name,
showChevron: false,
},
{
onPressCallback: () => {
this.onContributorListItemPress(helpfulUsers.titouan);
this.onContributorListItemPress(AboutScreen.helpfulUsers.titouan);
},
icon: helpfulUsers.titouan.icon,
text: helpfulUsers.titouan.name,
icon: AboutScreen.helpfulUsers.titouan.icon,
text: AboutScreen.helpfulUsers.titouan.name,
showChevron: false,
},
{
onPressCallback: () => {
this.onContributorListItemPress(helpfulUsers.theo);
this.onContributorListItemPress(AboutScreen.helpfulUsers.theo);
},
icon: helpfulUsers.theo.icon,
text: helpfulUsers.theo.name,
icon: AboutScreen.helpfulUsers.theo.icon,
text: AboutScreen.helpfulUsers.theo.name,
showChevron: false,
},
];