Skip to content

Commit

Permalink
fixed readme with new images
Browse files Browse the repository at this point in the history
  • Loading branch information
Endo committed Feb 20, 2023
1 parent 47cce5d commit 2e2acfc
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@

- [MUI(Material UI)](https://mui.com/)
- [framer-motion](https://www.framer.com/docs/)
- [react-player](https://github.com/CookPete/react-player)
- [video.js](https://videojs.com)
- [react-use](https://github.com/streamich/react-use)
- [react-slick](https://react-slick.neostack.com/)

Expand Down
Binary file modified public/assets/detail-modal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/assets/grid-genre.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/assets/home-page.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/assets/mini-portal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/components/VideoCardPortal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export default function VideoCardModal({
return (
<Card
onMouseLeave={() => {
console.log("Mouse out");
setPortal(null, null);
}}
sx={{
Expand Down
12 changes: 10 additions & 2 deletions src/components/VideoItemWithHover.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useEffect, useState, useRef } from "react";
import { useEffect, useState, useRef, useDeferredValue } from "react";
import { Movie } from "src/types/Movie";
import { usePortal } from "src/providers/PortalProvider";
import { useGetConfigurationQuery } from "src/store/slices/configuration";
Expand All @@ -13,13 +13,15 @@ export default function VideoItemWithHover({ video }: VideoItemWithHoverProps) {
const { setPortal } = usePortal();
const elementRef = useRef<HTMLDivElement>(null);
const [isHovered, setIsHovered] = useState(false);
// const deferredStatus = useDeferredValue(isHovered);

const { data: configuration } = useGetConfigurationQuery(undefined);
const [debouncedHoverStated, setDebouncedHoverState] = useState(false);
useDebounce(
() => {
setDebouncedHoverState(isHovered);
},
700,
isHovered ? 300 : 0,
[isHovered]
);

Expand All @@ -29,6 +31,12 @@ export default function VideoItemWithHover({ video }: VideoItemWithHoverProps) {
}
}, [debouncedHoverStated]);

// useEffect(() => {
// if (deferredStatus) {
// setPortal(elementRef.current, video);
// }
// }, [deferredStatus]);

return (
<VideoItemWithHoverPure
src={`${configuration?.images.base_url}w300${video.backdrop_path}`}
Expand Down

0 comments on commit 2e2acfc

Please sign in to comment.