diff options
author | Paul Frazee <pfrazee@gmail.com> | 2022-11-07 16:24:06 -0600 |
---|---|---|
committer | Paul Frazee <pfrazee@gmail.com> | 2022-11-07 16:24:06 -0600 |
commit | e650d98924051abfee40ff956f7348e2e47e7cd7 (patch) | |
tree | 85f22717863eebe8942f6b66baf17b95dcbb9b90 /src/view/shell/mobile/index.tsx | |
parent | d228a5f4f5d118f30129f3bafd676bfe0e80bf38 (diff) | |
download | voidsky-e650d98924051abfee40ff956f7348e2e47e7cd7.tar.zst |
Add search view; factor out SuggestedFollows component; add suggested follows to search
Diffstat (limited to 'src/view/shell/mobile/index.tsx')
-rw-r--r-- | src/view/shell/mobile/index.tsx | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/view/shell/mobile/index.tsx b/src/view/shell/mobile/index.tsx index b359bdcb3..49b18a481 100644 --- a/src/view/shell/mobile/index.tsx +++ b/src/view/shell/mobile/index.tsx @@ -33,7 +33,12 @@ import {MainMenu} from './MainMenu' import {TabsSelector} from './TabsSelector' import {Composer} from './Composer' import {s, colors} from '../../lib/styles' -import {GridIcon, HomeIcon, BellIcon} from '../../lib/icons' +import { + GridIcon, + HomeIcon, + MangifyingGlassIcon, + BellIcon, +} from '../../lib/icons' const SWIPE_GESTURE_DIST_TRIGGER = 0.5 const SWIPE_GESTURE_VEL_TRIGGER = 2500 @@ -45,7 +50,7 @@ const Btn = ({ onPress, onLongPress, }: { - icon: IconProp | 'menu' | 'house' | 'bell' + icon: IconProp | 'menu' | 'house' | 'bell' | 'search' inactive?: boolean notificationCount?: number onPress?: (event: GestureResponderEvent) => void @@ -58,6 +63,11 @@ const Btn = ({ IconEl = GridIcon } else if (icon === 'house') { IconEl = HomeIcon + size = 24 + } else if (icon === 'search') { + IconEl = MangifyingGlassIcon + size = 24 + addedStyles = {position: 'relative', top: -1} as ViewStyle } else if (icon === 'bell') { IconEl = BellIcon size = 24 @@ -114,6 +124,7 @@ export const MobileShell: React.FC = observer(() => { store.nav.navigate('/') } } + const onPressSearch = () => store.nav.navigate('/search') const onPressMenu = () => setMainMenuActive(true) const onPressNotifications = () => store.nav.navigate('/notifications') const onPressTabs = () => setTabsSelectorActive(true) @@ -210,7 +221,7 @@ export const MobileShell: React.FC = observer(() => { </SafeAreaView> <View style={styles.bottomBar}> <Btn icon="house" onPress={onPressHome} /> - <Btn icon="search" inactive={true} onPress={() => {} /* TODO */} /> + <Btn icon="search" onPress={onPressSearch} /> <Btn icon="menu" onPress={onPressMenu} /> <Btn icon="bell" |