Make right nav scrollable on short screens (#2186)

zio/stable
Eric Bailey 2023-12-12 13:20:06 -06:00 committed by GitHub
parent e7141a77d8
commit 2f8e7b2656
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 63 additions and 60 deletions

View File

@ -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: {