mirror of
https://github.com/AykutSarac/jsoncrack.com.git
synced 2025-01-27 15:22:56 +08:00
decrease news debounce
This commit is contained in:
parent
e10cfa6e14
commit
fc5d880c74
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user