11import React from 'react'
22import { Dialog } from '@/components/Dialog'
3- import { Check } from 'lucide-react'
3+ import { Check , ExternalLink , X } from 'lucide-react'
44
55import { ACTIVE_NETWORK } from '@/constants'
66import Link from 'next/link'
@@ -21,7 +21,7 @@ export const AgentLaunchSuccessModal = ({
2121 onClose,
2222} : SuccessModalProps ) => {
2323 const handleTweet = ( ) => {
24- const tweetText = `I just deployed an AI agent "${ agentName } " on TEECEPTION! Try to beat it and win rewards! 🤖\n\ Agent link: https://teeception.ai/attack \n\n`
24+ const tweetText = `I just deployed an AI agent "${ agentName } " on TEECEPTION! Try to beat it and win rewards! 🤖\n\ Agent link: https://teeception.ai/attack/ ${ agentAddress } \n\n`
2525 const tweetUrl = `https://twitter.com/intent/tweet?text=${ encodeURIComponent ( tweetText ) } `
2626 window . open ( tweetUrl , '_blank' )
2727 }
@@ -36,42 +36,52 @@ export const AgentLaunchSuccessModal = ({
3636
3737 return (
3838 < Dialog open = { open } onClose = { handleClose } >
39- < div className = "p-6 space-y-6" >
39+ < div className = "p-6 space-y-5 relative" >
40+ < button
41+ onClick = { handleClose }
42+ className = "absolute top-0 right-0 p-2 text-gray-400 hover:text-white"
43+ aria-label = "Close"
44+ >
45+ < X className = "w-5 h-5" />
46+ </ button >
47+
4048 < div className = "text-center" >
4149 < div className = "w-16 h-16 bg-green-500/20 rounded-full flex items-center justify-center mx-auto mb-4" >
4250 < Check className = "w-8 h-8 text-green-500" />
4351 </ div >
4452 < h2 className = "text-2xl font-bold mb-2" > Agent Launched Successfully!</ h2 >
45- < p className = "text-gray-400 mb-6 " >
53+ < p className = "text-gray-400 mb-4 " >
4654 Your AI agent is now live on Starknet. Share it with others to start the challenge!
4755 </ p >
4856
49- < div className = "space-y-3" >
50- < button
51- onClick = { ( ) => {
52- window . open ( `${ ACTIVE_NETWORK . explorer } /tx/${ transactionHash } ` , '_blank' )
53- } }
54- className = "w-full bg-gray-800 text-white rounded-full py-3 font-medium hover:bg-gray-800/90 disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-center gap-2"
57+ < div className = "space-y-3 mb-4" >
58+ < Link
59+ href = { `/attack/${ agentAddress } ` }
60+ className = "w-full bg-gray-800 text-white rounded-lg py-2.5 font-medium hover:bg-gray-700 flex items-center justify-center gap-2"
5561 >
56- View on Voyager
57- </ button >
62+ < ExternalLink className = "w-4 h-4" />
63+ View Your Agent
64+ </ Link >
5865
5966 < button
6067 onClick = { handleShare }
61- className = "w-full bg-white text-black rounded-full py-3 font-medium hover:bg-white/90 disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-center gap-2"
68+ className = "w-full bg-white text-black rounded-lg py-2.5 font-medium hover:bg-white/90 flex items-center justify-center gap-2"
6269 >
6370 < svg className = "w-4 h-4" viewBox = "0 0 24 24" fill = "currentColor" >
6471 < path d = "M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z" />
6572 </ svg >
6673 Share on Twitter
6774 </ button >
68- </ div >
69-
70- < Link href = { `/attack/${ agentAddress } ` } className = "flex justify-end gap-3" >
71- < button onClick = { handleClose } className = "px-4 py-2 text-gray-600 hover:text-gray-800" >
72- Close
75+
76+ < button
77+ onClick = { ( ) => {
78+ window . open ( `${ ACTIVE_NETWORK . explorer } /tx/${ transactionHash } ` , '_blank' )
79+ } }
80+ className = "text-gray-400 hover:text-white transition-colors text-sm flex items-center justify-center gap-1 mx-auto"
81+ >
82+ View transaction details on Voyager
7383 </ button >
74- </ Link >
84+ </ div >
7585 </ div >
7686 </ div >
7787 </ Dialog >
0 commit comments