mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-24 20:36:40 +07:00
fixed scroll
This commit is contained in:
parent
17048f175c
commit
29a99e6f2c
3 changed files with 10 additions and 9 deletions
|
@ -1,2 +1,3 @@
|
|||
API_HOST = http://localhost:3333
|
||||
REMOTE_CURRENT = http://localhost/7777
|
||||
REACT_APP_API_HOST = https://pig.staging.vault48.org/
|
||||
REACT_APP_REMOTE_CURRENT = https://pig.staging.vault48.org/static/
|
||||
EXPOSE = 4000
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import React, { FC, MouseEventHandler, ReactElement, useEffect, useRef, } from 'react';
|
||||
import styles from './styles.module.scss';
|
||||
import { disableBodyScroll, enableBodyScroll } from 'body-scroll-lock';
|
||||
import { Icon } from '~/components/input/Icon';
|
||||
import { LoaderCircle } from '~/components/input/LoaderCircle';
|
||||
import React, { FC, MouseEventHandler, ReactElement, useEffect, useRef } from "react";
|
||||
import styles from "./styles.module.scss";
|
||||
import { clearAllBodyScrollLocks, disableBodyScroll } from "body-scroll-lock";
|
||||
import { Icon } from "~/components/input/Icon";
|
||||
import { LoaderCircle } from "~/components/input/LoaderCircle";
|
||||
|
||||
interface IProps {
|
||||
children: React.ReactChild;
|
||||
|
@ -36,7 +36,7 @@ const BetterScrollDialog: FC<IProps> = ({
|
|||
useEffect(() => {
|
||||
disableBodyScroll(ref.current, { reserveScrollBarGap: true });
|
||||
|
||||
return () => enableBodyScroll(ref.current);
|
||||
return () => clearAllBodyScrollLocks();
|
||||
}, [ref]);
|
||||
|
||||
return (
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"extends": "./tsconfig.paths.json",
|
||||
"compilerOptions": {
|
||||
"target": "es5",
|
||||
"target": "es6",
|
||||
"lib": [
|
||||
"dom",
|
||||
"dom.iterable",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue