Remove extra scrollbar (#888)

This commit is contained in:
saltrafael 2022-02-16 09:49:17 -03:00 committed by GitHub
parent 70c05972cc
commit 0774090bdc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 6 deletions

View file

@ -1,6 +1,9 @@
// @flow // @flow
import 'scss/component/_swipeable-drawer.scss'; import 'scss/component/_swipeable-drawer.scss';
// $FlowFixMe
import { Global } from '@emotion/react';
import { lazyImport } from 'util/lazyImport'; import { lazyImport } from 'util/lazyImport';
import { useIsMobile } from 'effects/use-screensize'; import { useIsMobile } from 'effects/use-screensize';
import { Menu, MenuList, MenuButton, MenuItem } from '@reach/menu-button'; import { Menu, MenuList, MenuButton, MenuItem } from '@reach/menu-button';
@ -64,6 +67,8 @@ export default function LivestreamLayout(props: Props) {
return ( return (
<> <>
{!isMobile && <GlobalStyles />}
<div className="section card-stack"> <div className="section card-stack">
<React.Suspense fallback={null}> <React.Suspense fallback={null}>
{isMobile && isCurrentClaimLive ? ( {isMobile && isCurrentClaimLive ? (
@ -199,3 +204,18 @@ const ChatDrawerTitle = (titleProps: any) => {
</div> </div>
); );
}; };
const GlobalStyles = () => (
<Global
styles={{
body: {
'scrollbar-width': '0px',
'&::-webkit-scrollbar': {
width: '0px',
height: '0px',
},
},
}}
/>
);

View file

@ -16,7 +16,6 @@ body {
display: flex; display: flex;
align-items: flex-start; align-items: flex-start;
justify-content: space-between; justify-content: space-between;
min-height: 100vh;
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
margin-top: var(--header-height); margin-top: var(--header-height);
@ -79,7 +78,6 @@ body {
} }
.main-wrapper__inner--auth { .main-wrapper__inner--auth {
min-height: calc(100vh - var(--header-height));
padding: 0; padding: 0;
.main--auth-page { .main--auth-page {
@ -95,10 +93,6 @@ body {
margin-right: auto; margin-right: auto;
margin-left: auto; margin-left: auto;
@media (min-width: $breakpoint-small) {
min-height: calc(100vh - var(--header-height));
}
@media (max-width: $breakpoint-small) { @media (max-width: $breakpoint-small) {
width: 100%; width: 100%;
} }