Skip to content

Commit

Permalink
feat(ShareModal): integrate react-query for clipboard functionality
Browse files Browse the repository at this point in the history
Added a new handleCopy function in ShareModal component that utilizes react-query's useQuery hook. This enhancement prepares the component for future web service integration related to clipboard operations.
  • Loading branch information
ali-josheghani committed Jan 18, 2025
1 parent 246e29c commit ba43e09
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/components/molecules/ShareModal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import ShareModalIcon from "../../../public/gifs/download.gif";
import CopyIcon from "../../../public/svgs/copy.svg";
import Image from "next/image";
import { copyToClipboard } from "@/utils/helper/handlers";
import { useQuery } from "@tanstack/react-query";

export default function ShareModal() {
const [linkText] = useState("Sallam/ENfrzWaQDSOKdeOtD");
Expand All @@ -32,6 +33,10 @@ export default function ShareModal() {
};
}, [onCloseModal]);

const handleCopy = () => {
const callWebService = useQuery("",{})
}

return (
<Modal isOpen={isOpenShareModal} onClose={onCloseModal}>
<Modal.Box
Expand Down

0 comments on commit ba43e09

Please sign in to comment.