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
|
REACT_APP_API_HOST = https://pig.staging.vault48.org/
|
||||||
REMOTE_CURRENT = http://localhost/7777
|
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 React, { FC, MouseEventHandler, ReactElement, useEffect, useRef } from "react";
|
||||||
import styles from './styles.module.scss';
|
import styles from "./styles.module.scss";
|
||||||
import { disableBodyScroll, enableBodyScroll } from 'body-scroll-lock';
|
import { clearAllBodyScrollLocks, disableBodyScroll } from "body-scroll-lock";
|
||||||
import { Icon } from '~/components/input/Icon';
|
import { Icon } from "~/components/input/Icon";
|
||||||
import { LoaderCircle } from '~/components/input/LoaderCircle';
|
import { LoaderCircle } from "~/components/input/LoaderCircle";
|
||||||
|
|
||||||
interface IProps {
|
interface IProps {
|
||||||
children: React.ReactChild;
|
children: React.ReactChild;
|
||||||
|
@ -36,7 +36,7 @@ const BetterScrollDialog: FC<IProps> = ({
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
disableBodyScroll(ref.current, { reserveScrollBarGap: true });
|
disableBodyScroll(ref.current, { reserveScrollBarGap: true });
|
||||||
|
|
||||||
return () => enableBodyScroll(ref.current);
|
return () => clearAllBodyScrollLocks();
|
||||||
}, [ref]);
|
}, [ref]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"extends": "./tsconfig.paths.json",
|
"extends": "./tsconfig.paths.json",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"target": "es5",
|
"target": "es6",
|
||||||
"lib": [
|
"lib": [
|
||||||
"dom",
|
"dom",
|
||||||
"dom.iterable",
|
"dom.iterable",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue