From 5ec1158618d65da00415c7c381ef122e4205a2ad Mon Sep 17 00:00:00 2001 From: Kanishk Rawat Date: Fri, 17 May 2024 15:57:50 +0530 Subject: [PATCH] Minor Fix --- components/actions/index.tsx | 6 +++--- components/frames/files.tsx | 2 +- components/frames/images.tsx | 3 ++- components/frames/recentImages.tsx | 5 +++-- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/components/actions/index.tsx b/components/actions/index.tsx index 5529eaf..ec02da0 100644 --- a/components/actions/index.tsx +++ b/components/actions/index.tsx @@ -20,12 +20,13 @@ export enum Action { download = "download" } -export const Actions = ({ theme, item, index }: { +export const Actions = ({ theme, item, index,menu,setMenu }: { theme: themeType, item: datatype, index: number + menu : number + setMenu : Dispatch> }) => { - const [menu, setMenu] = useState(-1); const [modal, setModal] = useState({ status: "", item: { name: "", url: "" } }) const handleClick = (index: number) => { if (index !== menu) setMenu(index); @@ -61,7 +62,6 @@ export const Actions = ({ theme, item, index }: { link.click(); document.body.removeChild(link); }); - } return ( diff --git a/components/frames/files.tsx b/components/frames/files.tsx index 95c6049..fde3a54 100644 --- a/components/frames/files.tsx +++ b/components/frames/files.tsx @@ -129,7 +129,7 @@ const RecentImages = ({ >
{item.date} - +
{ - + const [menu, setMenu] = useState(-1); return ( <> {loadingState || data.length <= 0 ? ( @@ -103,7 +104,7 @@ const RecentImages = ({

{item.date}

- +