chore(deps): update to react 19

This commit is contained in:
Prayag Prajapati committed 2025-02-19 22:18:47 +05:30
1 parent 412e54fd82
commit 83c96cf65c
5 files changed
+1662 -1453

No files matched your search

+43 -42
View File
@@ -1,51 +1,52 @@
import React, { useCallback, useMemo } from "react";
import { Dialog, Slide } from "@mui/material";
import { useKonamiEasterEgg } from "../../utils/misc/konami";
// import { useKonamiEasterEgg } from "../../utils/misc/konami";
export const EasterEgg = () => {
const [easterEgg, setEasterEgg] = useKonamiEasterEgg();
// const [easterEgg, setEasterEgg] = useKonamiEasterEgg();
// Memoize the onClose function
const handleClose = useCallback(() => {
setEasterEgg(false);
}, [setEasterEgg]);
// // Memoize the onClose function
// const handleClose = useCallback(() => {
// setEasterEgg(false);
// }, [setEasterEgg]);
// Memoize the sx object
const dialogSx = useMemo(
() => ({
background: "black",
}),
[],
);
// // Memoize the sx object
// const dialogSx = useMemo(
// () => ({
// background: "black",
// }),
// [],
// );
return (
<>
<Dialog open={easterEgg} onClose={handleClose} sx={dialogSx}>
<iframe
width="560"
height="315"
src="https://www.youtube.com/embed/dQw4w9WgXcQ?autoplay=1&disablekb=1"
title="EasterEgg"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
/>
</Dialog>
<Slide direction="up" in={easterEgg} mountOnEnter unmountOnExit>
<img
src="https://i.gifer.com/PYh.gif"
loading="lazy"
width={320}
height={320}
alt="nyan cat gif"
style={{
zIndex: "99999999",
position: "fixed",
bottom: 0,
left: 0,
objectFit: "cover",
}}
/>
</Slide>
</>
);
// return (
// <>
// <Dialog open={easterEgg} onClose={handleClose} sx={dialogSx}>
// <iframe
// width="560"
// height="315"
// src="https://www.youtube.com/embed/dQw4w9WgXcQ?autoplay=1&disablekb=1"
// title="EasterEgg"
// allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
// />
// </Dialog>
// <Slide direction="up" in={easterEgg} mountOnEnter unmountOnExit>
// <img
// src="https://i.gifer.com/PYh.gif"
// loading="lazy"
// width={320}
// height={320}
// alt="nyan cat gif"
// style={{
// zIndex: "99999999",
// position: "fixed",
// bottom: 0,
// left: 0,
// objectFit: "cover",
// }}
// />
// </Slide>
// </>
// );
return <></>;
};