Bluesky app fork with some witchin' additions 💫
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

[APP-674] Fix search results tab bar (#822)

* fix search results tab bar

* Fix spacing on web

---------

Co-authored-by: Paul Frazee <pfrazee@gmail.com>

authored by

Ansh
Paul Frazee
and committed by
GitHub
54e5e309 49840f3a

+25 -4
+25 -4
src/view/com/search/SearchResults.tsx
··· 14 14 import {Text} from 'view/com/util/text/Text' 15 15 import {usePalette} from 'lib/hooks/usePalette' 16 16 import {s} from 'lib/styles' 17 + import {isDesktopWeb} from 'platform/detection' 17 18 18 19 const SECTIONS = ['Posts', 'Users'] 19 20 ··· 24 25 (props: RenderTabBarFnProps) => { 25 26 return ( 26 27 <CenteredView style={[pal.border, styles.tabBar]}> 27 - <TabBar {...props} items={SECTIONS} /> 28 + <TabBar 29 + items={SECTIONS} 30 + {...props} 31 + key={SECTIONS.join()} 32 + indicatorColor={pal.colors.link} 33 + /> 28 34 </CenteredView> 29 35 ) 30 36 }, ··· 33 39 34 40 return ( 35 41 <Pager renderTabBar={renderTabBar} tabBarPosition="top" initialPage={0}> 36 - <PostResults key="0" model={model} /> 37 - <Profiles key="1" model={model} /> 42 + <View style={[styles.results]}> 43 + <PostResults key="0" model={model} /> 44 + </View> 45 + <View style={[styles.results]}> 46 + <Profiles key="1" model={model} /> 47 + </View> 38 48 </Pager> 39 49 ) 40 50 }) ··· 60 70 } 61 71 62 72 return ( 63 - <ScrollView style={pal.view}> 73 + <ScrollView style={[pal.view]}> 64 74 {model.posts.map(post => ( 65 75 <Post 66 76 key={post.resolvedUri} ··· 111 121 const styles = StyleSheet.create({ 112 122 tabBar: { 113 123 borderBottomWidth: 1, 124 + position: 'absolute', 125 + zIndex: 1, 126 + left: 0, 127 + right: 0, 128 + top: 0, 129 + flexDirection: 'column', 130 + alignItems: 'center', 131 + backgroundColor: 'white', 114 132 }, 115 133 empty: { 116 134 paddingHorizontal: 14, 117 135 paddingVertical: 16, 136 + }, 137 + results: { 138 + paddingTop: isDesktopWeb ? 50 : 42, 118 139 }, 119 140 })