@@ -5,23 +5,14 @@ import {data as credits} from '../../../docs/credits.json'
55import glamorous from 'glamorous-native'
66import { Platform } from 'react-native'
77import { iOSUIKit , material } from 'react-native-typography'
8-
9- import { icons as appIcons } from '../../../images/icon-images'
10- import * as Icons from '@hawkrives/react-native-alternate-icons'
11- import type { TopLevelViewPropsType } from '../types'
8+ import { AppLogo } from '../components/logo'
129
1310const Container = glamorous . scrollView ( {
1411 backgroundColor : c . white ,
1512 paddingHorizontal : 5 ,
1613 paddingVertical : 10 ,
1714} )
1815
19- const Logo = glamorous . image ( {
20- width : 100 ,
21- height : 100 ,
22- alignSelf : 'center' ,
23- } )
24-
2516const Title = glamorous . text ( {
2617 textAlign : 'center' ,
2718 marginTop : 10 ,
@@ -58,49 +49,22 @@ const Contributors = glamorous(About)({
5849
5950const formatPeopleList = arr => arr . map ( w => w . replace ( ' ' , ' ' ) ) . join ( ' • ' )
6051
61- type Props = TopLevelViewPropsType
62-
63- type State = {
64- iconType : null | string ,
65- }
66-
67- export default class CreditsView extends React . Component < Props , State > {
68- static navigationOptions = {
69- title : 'Credits' ,
70- }
52+ export default function CreditsView ( ) {
53+ return (
54+ < Container contentInsetAdjustmentBehavior = "automatic" >
55+ < AppLogo />
7156
72- state = {
73- iconType : null ,
74- }
57+ < Title > { credits . name } </ Title >
58+ < About > { credits . content } </ About >
7559
76- componentWillMount ( ) {
77- this . getIcon ( )
78- }
60+ < Heading > Contributors</ Heading >
61+ < Contributors > { formatPeopleList ( credits . contributors ) } </ Contributors >
7962
80- getIcon = async ( ) => {
81- const name = await Icons . getIconName ( )
82- this . setState ( ( ) => ( { iconType : name } ) )
83- }
84-
85- render ( ) {
86- const image =
87- this . state . iconType === 'default' ? appIcons . oldMain : appIcons . windmill
88-
89- return (
90- < Container contentInsetAdjustmentBehavior = "automatic" >
91- < Logo source = { image } />
92-
93- < Title > { credits . name } </ Title >
94- < About > { credits . content } </ About >
95-
96- < Heading > Contributors</ Heading >
97- < Contributors > { formatPeopleList ( credits . contributors ) } </ Contributors >
98-
99- < Heading > Acknowledgements</ Heading >
100- < Contributors >
101- { formatPeopleList ( credits . acknowledgements ) }
102- </ Contributors >
103- </ Container >
104- )
105- }
63+ < Heading > Acknowledgements</ Heading >
64+ < Contributors > { formatPeopleList ( credits . acknowledgements ) } </ Contributors >
65+ </ Container >
66+ )
67+ }
68+ CreditsView . navigationOptions = {
69+ title : 'Credits' ,
10670}
0 commit comments