decrease news debounce

This commit is contained in:
AykutSarac 2023-04-24 20:48:32 +03:00
parent e10cfa6e14
commit fc5d880c74
No known key found for this signature in database

View File

@ -3,13 +3,15 @@ import { Modal, Group, Button, MantineProvider, Image, Text, Paper } from "@mant
import { useDebouncedState, useSessionStorage } from "@mantine/hooks";
export const HerowandModal = () => {
const [opened, setOpened] = useDebouncedState(false, 600);
const [opened, setOpened] = useDebouncedState(false, 300);
const [isNewsVisible, setNewsVisible] = useSessionStorage<boolean>({
key: "news",
defaultValue: true,
getInitialValueInEffect: true,
});
console.log(isNewsVisible);
React.useEffect(() => {
if (isNewsVisible) setOpened(true);
else setOpened(false);