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