From c6108fb64674664f5020829a10b0157ad2ba2be6 Mon Sep 17 00:00:00 2001 From: Paul Frazee Date: Sun, 20 Nov 2022 12:25:11 -0600 Subject: Move search btn into the viewheader --- src/view/com/util/ViewHeader.tsx | 43 ++++++++++++++++++++++------------------ 1 file changed, 24 insertions(+), 19 deletions(-) (limited to 'src/view/com/util/ViewHeader.tsx') diff --git a/src/view/com/util/ViewHeader.tsx b/src/view/com/util/ViewHeader.tsx index 7e68bcd15..55a71ea26 100644 --- a/src/view/com/util/ViewHeader.tsx +++ b/src/view/com/util/ViewHeader.tsx @@ -3,6 +3,7 @@ import {StyleSheet, Text, TouchableOpacity, View} from 'react-native' import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome' import {UserAvatar} from './UserAvatar' import {colors} from '../../lib/styles' +import {MagnifyingGlassIcon} from '../../lib/icons' import {useStores} from '../../../state' export function ViewHeader({ @@ -16,16 +17,14 @@ export function ViewHeader({ const onPressBack = () => { store.nav.tab.goBack() } - const onPressAvatar = () => { - if (store.me.handle) { - store.nav.navigate(`/profile/${store.me.handle}`) - } + const onPressSearch = () => { + store.nav.navigate(`/search`) } return ( {store.nav.tab.canGoBack ? ( - + ) : ( @@ -38,17 +37,9 @@ export function ViewHeader({ ) : undefined} - {store.me.did ? ( - - - - ) : ( - - )} + + + ) } @@ -83,8 +74,22 @@ const styles = StyleSheet.create({ }, cornerPlaceholder: { - width: 24, - height: 24, + width: 30, + height: 30, + }, + backIcon: {width: 30, height: 30}, + searchBtn: { + flexDirection: 'row', + alignItems: 'center', + justifyContent: 'center', + backgroundColor: colors.gray1, + width: 30, + height: 30, + borderRadius: 15, + }, + searchBtnIcon: { + color: colors.black, + position: 'relative', + top: -1, }, - backIcon: {width: 24, height: 24}, }) -- cgit 1.4.1