some changes
This commit is contained in:
@@ -11,11 +11,11 @@ const BackButton = ({ offsetY }: BackButtonProps) => {
|
||||
|
||||
return (
|
||||
<Box
|
||||
style={{ cursor: 'pointer', zIndex: 1000, transform: `translateY(-${offsetY}px)` }}
|
||||
style={{ cursor: 'pointer', zIndex: 1000 }}
|
||||
onClick={() => router.history.back()}
|
||||
pos='absolute'
|
||||
left={{ base: 0, sm: 100, md: 200, lg: 300 }}
|
||||
m={20}
|
||||
left={16}
|
||||
top={0}
|
||||
>
|
||||
<ArrowLeftIcon weight='bold' size={20} />
|
||||
</Box>
|
||||
|
||||
@@ -13,15 +13,11 @@ const Header = ({ withBackButton, settingsLink, collapsed, title, scrollPosition
|
||||
}, [collapsed, scrollPosition.y]);
|
||||
|
||||
return (
|
||||
<>
|
||||
{settingsLink && <SettingsButton to={settingsLink} offsetY={offsetY} />}
|
||||
{withBackButton && <BackButton offsetY={offsetY} />}
|
||||
<AppShell.Header id='app-header' display={collapsed ? 'none' : 'block'}>
|
||||
<Flex justify='center' align='center' h='100%' px='md'>
|
||||
<Title order={2}>{title}</Title>
|
||||
</Flex>
|
||||
</AppShell.Header>
|
||||
</>
|
||||
<AppShell.Header id='app-header' display={collapsed ? 'none' : 'block'}>
|
||||
<Flex justify='center' align='center' h='100%' px='md'>
|
||||
<Title order={2}>{title}</Title>
|
||||
</Flex>
|
||||
</AppShell.Header>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -40,7 +40,8 @@ const Layout: React.FC<PropsWithChildren> = ({ children }) => {
|
||||
mah='100%'
|
||||
pb={{ base: 70, md: 0 }}
|
||||
px={{ base: 0.01, sm: 100, md: 200, lg: 300 }}
|
||||
style={{ transition: 'none' }}
|
||||
maw='100dvw'
|
||||
style={{ transition: 'none', overflow: 'hidden' }}
|
||||
>
|
||||
<Pullable scrollPosition={scrollPosition} onScrollPositionChange={setScrollPosition}>
|
||||
<Page noPadding={!withPadding} fullWidth={fullWidth}>
|
||||
|
||||
@@ -12,11 +12,11 @@ const SettingsButton = ({ offsetY, to }: SettingButtonProps) => {
|
||||
|
||||
return (
|
||||
<Box
|
||||
style={{ cursor: 'pointer', zIndex: 1000, transform: `translateY(-${offsetY}px)` }}
|
||||
style={{ cursor: 'pointer', zIndex: 1000 }}
|
||||
onClick={() => navigate({ to })}
|
||||
pos='absolute'
|
||||
right={{ base: 0, sm: 100, md: 200, lg: 300 }}
|
||||
m={20}
|
||||
right={16}
|
||||
top={0}
|
||||
>
|
||||
<GearIcon weight='bold' size={20} />
|
||||
</Box>
|
||||
|
||||
Reference in New Issue
Block a user