Skip to content

Commit 321cb92

Browse files
committed
move the Contacts footers to the detail views
1 parent 14985a0 commit 321cb92

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

source/views/contacts/contact-detail.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,16 @@
22
import React from 'react'
33
import {Alert, StyleSheet} from 'react-native'
44
import {Markdown} from '../components/markdown'
5+
import {ListFooter} from '../components/list'
56
import glamorous from 'glamorous-native'
67
import {phonecall} from 'react-native-communications'
78
import {tracker} from '../../analytics'
89
import {Button} from '../components/button'
910
import openUrl from '../components/open-url'
1011
import type {ContactType} from './types'
1112

13+
const AAO_URL = 'https://github.com/StoDevX/AAO-React-Native/issues/new'
14+
1215
const Title = glamorous.text({
1316
fontSize: 36,
1417
textAlign: 'center',
@@ -68,11 +71,18 @@ export class ContactsDetailView extends React.PureComponent {
6871
return (
6972
<Container>
7073
<Title selectable={true}>{contact.title}</Title>
74+
7175
<Markdown
7276
styles={{Paragraph: styles.paragraph}}
7377
source={contact.text}
7478
/>
79+
7580
<Button onPress={this.onPress} title={contact.buttonText} />
81+
82+
<ListFooter
83+
title="Collected by the humans of All About Olaf"
84+
href={AAO_URL}
85+
/>
7686
</Container>
7787
)
7888
}

source/views/contacts/contact-list.js

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,14 @@
77
import React from 'react'
88
import {SectionList, StyleSheet} from 'react-native'
99
import {ListSeparator, ListSectionHeader} from '../components/list'
10-
import {ListEmpty, ListFooter} from '../components/list'
10+
import {ListEmpty} from '../components/list'
1111
import {ContactRow} from './contact-row'
1212
import {data} from './data'
1313
import groupBy from 'lodash/groupBy'
1414
import toPairs from 'lodash/toPairs'
1515
import * as c from '../components/colors'
1616
import type {ContactType} from './types'
1717

18-
const AAO_URL = 'https://github.com/StoDevX/AAO-React-Native/issues/new'
19-
2018
const groupContacts = (contacts: ContactType[]) => {
2119
const grouped = groupBy(contacts, c => c.category)
2220
return toPairs(grouped).map(([key, value]) => ({title: key, data: value}))
@@ -56,12 +54,6 @@ export default class ContactsListView extends React.PureComponent {
5654
<SectionList
5755
ItemSeparatorComponent={ListSeparator}
5856
ListEmptyComponent={<ListEmpty mode="bug" />}
59-
ListFooterComponent={
60-
<ListFooter
61-
title="Collected by the humans of All About Olaf"
62-
href={AAO_URL}
63-
/>
64-
}
6557
style={styles.listContainer}
6658
data={groupedData}
6759
sections={groupedData}

0 commit comments

Comments
 (0)