Fix sidebar alignment
This commit is contained in:
@@ -322,6 +322,7 @@ export function DesktopLeftNav() {
|
|||||||
<View
|
<View
|
||||||
role="navigation"
|
role="navigation"
|
||||||
style={[
|
style={[
|
||||||
|
a.px_xl,
|
||||||
styles.leftNav,
|
styles.leftNav,
|
||||||
isTablet && styles.leftNavTablet,
|
isTablet && styles.leftNavTablet,
|
||||||
pal.view,
|
pal.view,
|
||||||
@@ -479,7 +480,19 @@ const styles = StyleSheet.create({
|
|||||||
position: 'fixed',
|
position: 'fixed',
|
||||||
top: 10,
|
top: 10,
|
||||||
// @ts-ignore web only
|
// @ts-ignore web only
|
||||||
left: 'calc(50vw - 300px - 220px - 20px)',
|
left: '50%',
|
||||||
|
transform: [
|
||||||
|
{
|
||||||
|
translateX: -300,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
translateX: '-100%',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
// @ts-ignore web only -esb
|
||||||
|
translateX: 'var(--scrollbar-offset-negative, 0px)',
|
||||||
|
},
|
||||||
|
],
|
||||||
width: 220,
|
width: 220,
|
||||||
// @ts-ignore web only
|
// @ts-ignore web only
|
||||||
maxHeight: 'calc(100vh - 10px)',
|
maxHeight: 'calc(100vh - 10px)',
|
||||||
@@ -492,7 +505,10 @@ const styles = StyleSheet.create({
|
|||||||
borderRightWidth: 1,
|
borderRightWidth: 1,
|
||||||
height: '100%',
|
height: '100%',
|
||||||
width: 76,
|
width: 76,
|
||||||
|
paddingLeft: 0,
|
||||||
|
paddingRight: 0,
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
|
transform: [],
|
||||||
},
|
},
|
||||||
|
|
||||||
profileCard: {
|
profileCard: {
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ export function DesktopRightNav({routeName}: {routeName: string}) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View style={[styles.rightNav, pal.view]}>
|
<View style={[a.px_xl, styles.rightNav, pal.view]}>
|
||||||
<View style={{paddingVertical: 20}}>
|
<View style={{paddingVertical: 20}}>
|
||||||
{routeName === 'Search' ? (
|
{routeName === 'Search' ? (
|
||||||
<View style={{marginBottom: 18}}>
|
<View style={{marginBottom: 18}}>
|
||||||
@@ -122,8 +122,16 @@ const styles = StyleSheet.create({
|
|||||||
// @ts-ignore web only
|
// @ts-ignore web only
|
||||||
position: 'fixed',
|
position: 'fixed',
|
||||||
// @ts-ignore web only
|
// @ts-ignore web only
|
||||||
left: 'calc(50vw + 300px + 20px)',
|
left: '50%',
|
||||||
width: 300,
|
transform: [
|
||||||
|
{
|
||||||
|
translateX: 300,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
// @ts-ignore web only -esb
|
||||||
|
translateX: 'var(--scrollbar-offset-negative, 0px)',
|
||||||
|
},
|
||||||
|
],
|
||||||
maxHeight: '100%',
|
maxHeight: '100%',
|
||||||
overflowY: 'auto',
|
overflowY: 'auto',
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user