File tree Expand file tree Collapse file tree 2 files changed +228
-287
lines changed Expand file tree Collapse file tree 2 files changed +228
-287
lines changed Original file line number Diff line number Diff line change @@ -225,9 +225,21 @@ export default function CreateCAT() {
225225 message : "CAT contract deployed successfully!" ,
226226 } ) ;
227227
228+ // Trigger sync notification for my-cats page
229+ localStorage . setItem ( 'catCreated' , JSON . stringify ( {
230+ timestamp : Date . now ( ) ,
231+ chainId : config . state . chainId ,
232+ hash : deployData
233+ } ) ) ;
234+
235+ // Dispatch custom event for immediate sync if my-cats page is open
236+ window . dispatchEvent ( new CustomEvent ( 'catCreated' , {
237+ detail : { chainId : config . state . chainId , hash : deployData }
238+ } ) ) ;
239+
228240 // Add a small delay before redirecting to ensure the blockchain state is updated
229241 setTimeout ( ( ) => {
230- router . push ( "/my-cats" ) ;
242+ router . push ( "/my-cats?sync=true " ) ;
231243 setIsDeploying ( false ) ;
232244 } , 2000 ) ;
233245 } catch ( error ) {
You can’t perform that action at this time.
0 commit comments