* WIP * Add shell state * Integrate new shell state for drawer and minimal shell mode * Replace isDrawerSwipeDisabled * Split shell state into separate contexts to avoid needless re-renders * Fix typo --------- Co-authored-by: Paul Frazee <pfrazee@gmail.com>
42 lines
1.4 KiB
TypeScript
42 lines
1.4 KiB
TypeScript
import React from 'react'
|
|
import {View} from 'react-native'
|
|
import {useFocusEffect} from '@react-navigation/native'
|
|
import {Text} from 'view/com/util/text/Text'
|
|
import {TextLink} from 'view/com/util/Link'
|
|
import {NativeStackScreenProps, CommonNavigatorParams} from 'lib/routes/types'
|
|
import {ViewHeader} from '../com/util/ViewHeader'
|
|
import {ScrollView} from 'view/com/util/Views'
|
|
import {usePalette} from 'lib/hooks/usePalette'
|
|
import {s} from 'lib/styles'
|
|
import {useSetMinimalShellMode} from '#/state/shell'
|
|
|
|
type Props = NativeStackScreenProps<CommonNavigatorParams, 'TermsOfService'>
|
|
export const TermsOfServiceScreen = (_props: Props) => {
|
|
const pal = usePalette('default')
|
|
const setMinimalShellMode = useSetMinimalShellMode()
|
|
|
|
useFocusEffect(
|
|
React.useCallback(() => {
|
|
setMinimalShellMode(false)
|
|
}, [setMinimalShellMode]),
|
|
)
|
|
|
|
return (
|
|
<View>
|
|
<ViewHeader title="Terms of Service" />
|
|
<ScrollView style={[s.hContentRegion, pal.view]}>
|
|
<View style={[s.p20]}>
|
|
<Text style={pal.text}>
|
|
The Terms of Service have been moved to{' '}
|
|
<TextLink
|
|
style={pal.link}
|
|
href="https://blueskyweb.xyz/support/tos"
|
|
text="blueskyweb.xyz/support/tos"
|
|
/>
|
|
</Text>
|
|
</View>
|
|
<View style={s.footerSpacer} />
|
|
</ScrollView>
|
|
</View>
|
|
)
|
|
}
|