Add /support and /support/privacy

This commit is contained in:
Paul Frazee 2023-03-13 20:34:01 -05:00
parent 56cf890deb
commit 6533d7dd08
13 changed files with 859 additions and 16 deletions

View file

@ -0,0 +1,38 @@
import React from 'react'
import {View} from 'react-native'
import {useFocusEffect} from '@react-navigation/native'
import {NativeStackScreenProps, CommonNavigatorParams} from 'lib/routes/types'
import {ViewHeader} from '../com/util/ViewHeader'
import {useStores} from 'state/index'
import {ScrollView} from 'view/com/util/Views'
import {Text} from 'view/com/util/text/Text'
import {usePalette} from 'lib/hooks/usePalette'
import {s} from 'lib/styles'
import PrivacyPolicyHtml from '../../locale/en/privacy-policy'
type Props = NativeStackScreenProps<CommonNavigatorParams, 'PrivacyPolicy'>
export const PrivacyPolicyScreen = (_props: Props) => {
const pal = usePalette('default')
const store = useStores()
useFocusEffect(
React.useCallback(() => {
store.shell.setMinimalShellMode(false)
}, [store]),
)
return (
<View>
<ViewHeader title="Privacy Policy" />
<ScrollView style={[s.hContentRegion, pal.view]}>
<View style={[s.p20]}>
<Text type="title-xl" style={[pal.text, s.pb20]}>
Privacy Policy
</Text>
<PrivacyPolicyHtml />
</View>
<View style={s.footerSpacer} />
</ScrollView>
</View>
)
}

View file

@ -0,0 +1,44 @@
import React from 'react'
import {View} from 'react-native'
import {useFocusEffect} from '@react-navigation/native'
import {NativeStackScreenProps, CommonNavigatorParams} from 'lib/routes/types'
import {ViewHeader} from '../com/util/ViewHeader'
import {useStores} from 'state/index'
import {Text} from 'view/com/util/text/Text'
import {TextLink} from 'view/com/util/Link'
import {CenteredView} from 'view/com/util/Views'
import {usePalette} from 'lib/hooks/usePalette'
import {s} from 'lib/styles'
type Props = NativeStackScreenProps<CommonNavigatorParams, 'Support'>
export const SupportScreen = (_props: Props) => {
const store = useStores()
const pal = usePalette('default')
useFocusEffect(
React.useCallback(() => {
store.shell.setMinimalShellMode(false)
}, [store]),
)
return (
<View>
<ViewHeader title="Support" />
<CenteredView>
<Text type="title-xl" style={[pal.text, s.p20, s.pb5]}>
Support
</Text>
<Text style={[pal.text, s.p20]}>
If you need help, email us at{' '}
<TextLink
href="mailto:support@bsky.app"
text="support@bsky.app"
style={pal.link}
/>{' '}
with a description of your issue and information about how we can help
you.
</Text>
</CenteredView>
</View>
)
}