Skip to content

Commit

Permalink
fix: scrolling and height on mobile.
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonovDm committed Sep 20, 2024
1 parent 82d5236 commit c8b138a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
1 change: 0 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
<title>Spectrum</title>
<style>
#app { height: 100% }
#app > div { height: 100% }
</style>
</head>
<body>
Expand Down
11 changes: 8 additions & 3 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Box, Flex, Typography } from '@ergolabs/ui-kit';
import { Box, Flex, Typography, useDevice } from '@ergolabs/ui-kit';
import { Suspense, useEffect } from 'react';
import * as React from 'react';
import { BrowserRouter } from 'react-router-dom';
Expand Down Expand Up @@ -40,6 +40,7 @@ const initializeApp = () => {
export const ApplicationInitializer: React.FC = () => {
const [{ theme }] = useApplicationSettings();
const [] = useObservable(isAppInitialized$, [], false);
const { s } = useDevice();

useBodyClass([theme]);
useMetaThemeColor(
Expand All @@ -63,8 +64,12 @@ export const ApplicationInitializer: React.FC = () => {
<BrowserRouter>
<LanguageProvider>
<Glow />
<Flex align="center" justify="center">
<Box borderRadius="xl" padding={4}>
<Flex
align="center"
justify="center"
style={{ height: s ? undefined : '100%' }}
>
<Box borderRadius="xl" padding={s ? [4, 4, 20, 4] : 4}>
<Flex style={{ maxWidth: '500px' }} col>
<Typography.Body>Dear Community Member,</Typography.Body>
<br />
Expand Down
2 changes: 1 addition & 1 deletion src/assets/styles/styles.less
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ html {
}

body {
overflow: hidden;
overflow: auto;
width: 100%;
height: 100%;
background-color: var(--spectrum-body-bg);
Expand Down

0 comments on commit c8b138a

Please sign in to comment.