반응형
 const handleCopyText = async(text:string) =>{
    try {
      await navigator.clipboard.writeText(text);
      alert('텍스트가 복사되었습니다.');
    } catch (e) {
      alert('복사에 실패하였습니다');
    }
  }
  
   <svg className="w-6 h-6 cursor-pointer" onClick={()=>handleCopyText(data.contractAddress)} fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>
반응형
복사했습니다!