File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
apps/xen-tg-app/src/components Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import ExternalLinkIcon from '../assets/external-link'
44import { TAgent } from '../types'
55import Agent from './Agent'
66import { API_URL } from '@/env'
7+ import { useEffect } from 'react'
78
89const queryFn =
910 (
@@ -86,6 +87,8 @@ const Capabilities = () => {
8687 } ,
8788 } )
8889
90+ useEffect ( ( ) => handleUpdateCapability . mutate ( { methodName : 'syncCapabilities' } ) , [ ] )
91+
8992 const openNearAI = ( ) => window . Telegram . WebApp . openLink ( 'https://app.near.ai/agents' )
9093
9194 return (
@@ -96,12 +99,7 @@ const Capabilities = () => {
9699 < button
97100 disabled = { handleUpdateCapability . isPending }
98101 className = { `${ handleUpdateCapability . isPending ? 'animate-spin-back' : '' } flex cursor-pointer items-center justify-between p-1.5 text-[#7A818B] transition ${ handleUpdateCapability . isPending ? '' : 'hover:text-(--color-main-text)' } ` }
99- onClick = { ( ) => {
100- handleUpdateCapability . mutate ( {
101- methodName : 'syncCapabilities' ,
102- params : { } ,
103- } )
104- } }
102+ onClick = { ( ) => handleUpdateCapability . mutate ( { methodName : 'syncCapabilities' } ) }
105103 >
106104 < SyncIcon />
107105 </ button >
You can’t perform that action at this time.
0 commit comments