Readd the FAB for composing new posts
This commit is contained in:
parent
f7d7c78611
commit
00b7189d5d
4 changed files with 76 additions and 11 deletions
|
@ -21,12 +21,10 @@ export const ViewHeader = observer(function ViewHeader({
|
|||
title,
|
||||
subtitle,
|
||||
canGoBack,
|
||||
onPost,
|
||||
}: {
|
||||
title: string
|
||||
subtitle?: string
|
||||
canGoBack?: boolean
|
||||
onPost?: () => void
|
||||
}) {
|
||||
const theme = useTheme()
|
||||
const pal = usePalette('default')
|
||||
|
@ -37,9 +35,6 @@ export const ViewHeader = observer(function ViewHeader({
|
|||
const onPressMenu = () => {
|
||||
store.shell.setMainMenuOpen(true)
|
||||
}
|
||||
const onPressCompose = () => {
|
||||
store.shell.openComposer({onPost})
|
||||
}
|
||||
const onPressSearch = () => {
|
||||
store.nav.navigate(`/search`)
|
||||
}
|
||||
|
@ -85,12 +80,6 @@ export const ViewHeader = observer(function ViewHeader({
|
|||
</Text>
|
||||
) : undefined}
|
||||
</View>
|
||||
<TouchableOpacity
|
||||
onPress={onPressCompose}
|
||||
hitSlop={HITSLOP}
|
||||
style={[styles.btn, {backgroundColor: pal.colors.backgroundLight}]}>
|
||||
<FontAwesomeIcon size={18} icon="plus" style={pal.text} />
|
||||
</TouchableOpacity>
|
||||
<TouchableOpacity
|
||||
onPress={onPressSearch}
|
||||
hitSlop={HITSLOP}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue