const handleCopyClipBoard = async (text) => {
try {
await navigator.clipboard.writeText(text);
alert("링크가 복사되었어요.");
} catch (err) {
console.log(err);
}
};
<button
className="retry-btn"
onClick={() => handleCopyClipBoard(`${baseUrl}${location.pathname}`)}
> 공유링크 </button>