Skip to content

Commit

Permalink
feat(rn): added 'Help' screen and subscreens
Browse files Browse the repository at this point in the history
  • Loading branch information
aeddi committed Oct 24, 2018
1 parent 5b303f3 commit fcc1129
Show file tree
Hide file tree
Showing 6 changed files with 101 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import React, { PureComponent } from 'react'
import { Header, Text, Flex } from '../../../Library'

export default class Contact extends PureComponent {
static navigationOptions = ({ navigation }) => ({
header: <Header navigation={navigation} title='Contact us' backBtn />,
})
render () {
return (
<Flex.Cols size={1} align='center' justify='between'>
<Flex.Rows size={1} align='center' justify='between'>
<Text big>Contact us</Text>
</Flex.Rows>
</Flex.Cols>
)
}
}
17 changes: 17 additions & 0 deletions client/react-native/common/components/Screens/Settings/Help/FAQ.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import React, { PureComponent } from 'react'
import { Header, Text, Flex } from '../../../Library'

export default class FAQ extends PureComponent {
static navigationOptions = ({ navigation }) => ({
header: <Header navigation={navigation} title='FAQ' backBtn />,
})
render () {
return (
<Flex.Cols size={1} align='center' justify='between'>
<Flex.Rows size={1} align='center' justify='between'>
<Text big>FAQ</Text>
</Flex.Rows>
</Flex.Cols>
)
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import React, { PureComponent } from 'react'
import { Image } from 'react-native'
import { Header, Menu, Flex } from '../../../Library'

export default class List extends PureComponent {
static navigationOptions = ({ navigation }) => ({
header: <Header navigation={navigation} title='Help' backBtn />,
tabBarVisible: false,
})

render () {
const { navigation } = this.props
return (
<Menu style={{ marginTop: 42 }}>
<Flex.Cols size={1} align='center' justify='between'>
<Flex.Rows size={1} align='center' justify='between'>
<Image
resizeMode='contain'
style={{ width: 300, height: 300 }}
source={require('../../../../static/img/square_help.svg')}
/>
</Flex.Rows>
</Flex.Cols>
<Menu.Section>
<Menu.Item
icon='book-open'
title='Read the FAQ'
onPress={() => navigation.push('help/faq')}
/>
</Menu.Section>
<Menu.Section>
<Menu.Item
icon='message-circle'
title='Contact us'
onPress={() => navigation.push('help/contact')}
/>
</Menu.Section>
</Menu>
)
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { createSubStackNavigator } from '../../../../helpers/react-navigation'
import List from './List'
import FAQ from './FAQ'
import Contact from './Contact'

export default createSubStackNavigator(
{
'help/list': List,
'help/faq': FAQ,
'help/contact': Contact,
},
{
initialRouteName: 'help/list',
}
)
14 changes: 8 additions & 6 deletions client/react-native/common/components/Screens/Settings/List.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,6 @@ export default class List extends PureComponent {
/>
</Menu.Section>
<Menu.Section>
<Menu.Item
icon='terminal'
title='Dev tools'
onPress={() => navigation.push('settings/devtools')}
/>
<Menu.Item
icon='life-buoy'
title='Help'
Expand All @@ -72,7 +67,14 @@ export default class List extends PureComponent {
<Menu.Item
icon='layers'
title='Legal terms'
onPress={() => navigation.push('settings/layers')}
onPress={() => navigation.push('settings/legal')}
/>
</Menu.Section>
<Menu.Section>
<Menu.Item
icon='terminal'
title='Dev tools'
onPress={() => navigation.push('settings/devtools')}
/>
</Menu.Section>
</Menu>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ import List from './List'
import MyAccount from './MyAccount'
import MyPublicKey from './MyPublicKey'
import MyQRCode from './MyQRCode'
import Devtools from './Devtools/index.js'
import About from './About/index.js'
import Help from './Help/index.js'
import Devtools from './Devtools/index.js'

export default createSubStackNavigator(
{
Expand All @@ -15,6 +16,7 @@ export default createSubStackNavigator(
'settings/my-account/my-public-key': MyPublicKey,
'settings/my-account/my-qr-code': MyQRCode,
'settings/about': About,
'settings/help': Help,
'settings/devtools': Devtools,
},
{
Expand Down

0 comments on commit fcc1129

Please sign in to comment.