Make right nav scrollable on short screens (#2186)
parent
e7141a77d8
commit
2f8e7b2656
|
@ -15,6 +15,7 @@ import {useLingui} from '@lingui/react'
|
|||
import {Plural, Trans, msg, plural} from '@lingui/macro'
|
||||
import {useSession} from '#/state/session'
|
||||
import {useInviteCodesQuery} from '#/state/queries/invites'
|
||||
import {ScrollView} from '#/view/com/util/Views'
|
||||
|
||||
export function DesktopRightNav() {
|
||||
const pal = usePalette('default')
|
||||
|
@ -29,6 +30,8 @@ export function DesktopRightNav() {
|
|||
|
||||
return (
|
||||
<View style={[styles.rightNav, pal.view]}>
|
||||
<ScrollView contentContainerStyle={{borderWidth: 0}}>
|
||||
<View style={{paddingVertical: 20}}>
|
||||
<DesktopSearch />
|
||||
|
||||
{hasSession && (
|
||||
|
@ -97,6 +100,8 @@ export function DesktopRightNav() {
|
|||
|
||||
{hasSession && <InviteCodes />}
|
||||
</View>
|
||||
</ScrollView>
|
||||
</View>
|
||||
)
|
||||
}
|
||||
|
||||
|
@ -168,12 +173,10 @@ function InviteCodes() {
|
|||
const styles = StyleSheet.create({
|
||||
rightNav: {
|
||||
position: 'absolute',
|
||||
top: 20,
|
||||
// @ts-ignore web only
|
||||
left: 'calc(50vw + 320px)',
|
||||
width: 304,
|
||||
// @ts-ignore web only
|
||||
maxHeight: '90vh',
|
||||
height: '100%',
|
||||
},
|
||||
|
||||
message: {
|
||||
|
|
Loading…
Reference in New Issue