show search in centre column on desktop
This commit is contained in:
parent
e87065f042
commit
71b6a447ab
6 changed files with 52 additions and 42 deletions
|
@ -21,7 +21,7 @@ export function DesktopFeeds() {
|
|||
})
|
||||
|
||||
return (
|
||||
<View style={[styles.container, pal.view, pal.border]}>
|
||||
<View style={[styles.container, pal.view]}>
|
||||
<FeedItem href="/" title="Following" current={route.name === 'Home'} />
|
||||
{feeds
|
||||
.filter(f => f.displayName !== 'Following')
|
||||
|
@ -90,7 +90,5 @@ const styles = StyleSheet.create({
|
|||
width: 300,
|
||||
paddingHorizontal: 12,
|
||||
paddingVertical: 18,
|
||||
borderTopWidth: 1,
|
||||
borderBottomWidth: 1,
|
||||
},
|
||||
})
|
||||
|
|
|
@ -16,7 +16,7 @@ import {Plural, Trans, msg, plural} from '@lingui/macro'
|
|||
import {useSession} from '#/state/session'
|
||||
import {useInviteCodesQuery} from '#/state/queries/invites'
|
||||
|
||||
export function DesktopRightNav() {
|
||||
export function DesktopRightNav({routeName}: {routeName: string}) {
|
||||
const pal = usePalette('default')
|
||||
const palError = usePalette('error')
|
||||
const {_} = useLingui()
|
||||
|
@ -30,12 +30,20 @@ export function DesktopRightNav() {
|
|||
return (
|
||||
<View style={[styles.rightNav, pal.view]}>
|
||||
<View style={{paddingVertical: 20}}>
|
||||
<DesktopSearch />
|
||||
|
||||
{hasSession && (
|
||||
<View style={{paddingTop: 18, marginBottom: 18}}>
|
||||
{routeName === 'Search' ? (
|
||||
<View style={{marginBottom: 18}}>
|
||||
<DesktopFeeds />
|
||||
</View>
|
||||
) : (
|
||||
<>
|
||||
<DesktopSearch />
|
||||
|
||||
{hasSession && (
|
||||
<View style={[pal.border, styles.desktopFeedsContainer]}>
|
||||
<DesktopFeeds />
|
||||
</View>
|
||||
)}
|
||||
</>
|
||||
)}
|
||||
|
||||
<View
|
||||
|
@ -196,4 +204,10 @@ const styles = StyleSheet.create({
|
|||
marginRight: 6,
|
||||
flexShrink: 0,
|
||||
},
|
||||
desktopFeedsContainer: {
|
||||
borderTopWidth: 1,
|
||||
borderBottomWidth: 1,
|
||||
marginTop: 18,
|
||||
marginBottom: 18,
|
||||
},
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue