diff --git a/src/pages/MoreArt.jsx b/src/pages/MoreArt.jsx index 406f7c9..8092e48 100644 --- a/src/pages/MoreArt.jsx +++ b/src/pages/MoreArt.jsx @@ -1,35 +1,44 @@ -import React from 'react'; -import { Card, CardHeader, Image, Button, CardFooter } from '@nextui-org/react'; +import { useState } from 'react'; +import { useNavigate } from 'react-router-dom'; import { + Card, + CardHeader, + Image, + Button, + CardFooter, + Tooltip, Dropdown, DropdownTrigger, DropdownMenu, DropdownItem, } from '@nextui-org/react'; import { - FacebookIcon, FacebookShareButton, - XIcon, - TwitterShareButton, WhatsappShareButton, - WhatsappIcon, + TwitterShareButton, RedditShareButton, - RedditIcon, EmailShareButton, + FacebookIcon, + WhatsappIcon, + TwitterIcon, + RedditIcon, EmailIcon, } from 'react-share'; import { allLists } from '../data/list'; -import { MdIosShare } from 'react-icons/md'; -import { TbDots } from 'react-icons/tb'; -import { GoDownload } from 'react-icons/go'; -import { MdOutlineReport } from 'react-icons/md'; +import { + FaDownload, + FaExclamationTriangle, + FaShareAlt, + FaEllipsisV, +} from 'react-icons/fa'; -export default function MoreArt() { +const MoreArt = () => { + const navigate = useNavigate(); + const [savedStates, setSavedStates] = useState({}); + const shareUrl = 'https://kyziq.github.io/artistry-hub/'; + const title = 'Artistry-Hub'; const fixedWidth = '250px'; - const shareUrl = 'http://github.com'; - const title = 'GitHub'; - const [savedStates, setSavedStates] = React.useState({}); const toggleSaveState = (index) => { setSavedStates((prevState) => ({ ...prevState, @@ -37,164 +46,186 @@ export default function MoreArt() { })); }; - const handleDownload = (imageUrl, imageName) => { - // Create an anchor element + const handleDownload = (imageUrl, imageName = 'download') => { const anchor = document.createElement('a'); anchor.href = imageUrl; - anchor.download = imageName || 'download'; + anchor.download = imageName; anchor.click(); }; + const handleImageClick = (itemId) => navigate(`/art/${itemId}`); + return (