diff --git a/app/(site)/container.tsx b/app/(site)/container.tsx
index d12edf3..ad6ed6d 100644
--- a/app/(site)/container.tsx
+++ b/app/(site)/container.tsx
@@ -1,12 +1,14 @@
'use client';
import { useEffect, useState } from 'react';
+import { createPortal } from 'react-dom';
import { useAtom } from 'jotai';
import { atomWithStorage } from 'jotai/utils';
import { ArrowLeft, ArrowRight, SlidersHorizontal } from 'lucide-react';
import Movie from '@/components/Movie/Preview';
import { Button } from '@/components/ui/button';
+import useMounted from '@/hooks/useMounted';
import { genres } from '@/lib/api';
import getQueryClient from '@/lib/queryClient';
@@ -19,6 +21,7 @@ export default function Container() {
const [isShowFilter, setIsShowFilter] = useAtom(isShowFilterAtom);
const { movie, next, previous, hasPrevious } = useRandomMovie();
const [direction, setDirection] = useState(0);
+ const isMounted = useMounted();
useEffect(() => {
const queryClient = getQueryClient();
@@ -34,23 +37,33 @@ export default function Container() {
return (
<>
{isShowFilter && }
-
-
-
-
-
-
+
+
+
+ {isMounted &&
+ createPortal(
+
,
+ document.getElementById('actions')!
+ )}
+
+
+
>
);
diff --git a/components/Header/components/Navigation/index.tsx b/components/Header/components/Navigation/index.tsx
index 9decc42..7445052 100644
--- a/components/Header/components/Navigation/index.tsx
+++ b/components/Header/components/Navigation/index.tsx
@@ -1,5 +1,6 @@
'use client';
+import { useState } from 'react';
import { Menu } from 'lucide-react';
import Link from 'next/link';
import { usePathname } from 'next/navigation';
@@ -31,11 +32,12 @@ interface Props {
}
export function NavigationSmall({ className }: Props) {
+ const [isOpen, setIsOpen] = useState(false);
const currentPath = usePathname();
return (
-
+
diff --git a/components/Movie/Preview/components/Actions.tsx b/components/Movie/Preview/components/Actions.tsx
index 536af62..3c7e99a 100644
--- a/components/Movie/Preview/components/Actions.tsx
+++ b/components/Movie/Preview/components/Actions.tsx
@@ -17,13 +17,13 @@ export default function Actions({ onClose, movie }: Props) {
return (
<>