File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed
Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -53,15 +53,15 @@ const Agent: FC<TAgentProps> = ({ capabilitiy }) => {
5353 } )
5454
5555 const action = useMemo ( ( ) => {
56+ // ToDo: better to use capabilitiy.id?
5657 if ( capabilitiy . name === 'news-monitor' ) return ( ) => navigate ( '/news-monitor' )
5758 } , [ capabilitiy , navigate ] )
5859
5960 const handleChangeStatus = ( ) =>
6061 handleToggleCapability . mutate ( {
6162 methodName : capabilitiy . isEnabled ? 'disableCapability' : 'enableCapability' ,
6263 params : {
63- domain : capabilitiy . domain ,
64- name : capabilitiy . name ,
64+ id : capabilitiy . id ,
6565 } ,
6666 } )
6767
@@ -108,8 +108,7 @@ const Agent: FC<TAgentProps> = ({ capabilitiy }) => {
108108 handleRemoveCapability.mutate({
109109 methodName: 'removeCapability',
110110 params: {
111- domain: capabilitiy.domain,
112- name: capabilitiy.name,
111+ id: capabilitiy.id,
113112 },
114113 }) }
115114 >
Original file line number Diff line number Diff line change @@ -157,7 +157,7 @@ const Capabilities = () => {
157157 </ div >
158158 { capabilities ?. pages . map ( ( group ) =>
159159 group ?. items ?. map ( ( capabilitiy ) => (
160- < Agent key = { capabilitiy . name } capabilitiy = { capabilitiy } />
160+ < Agent key = { capabilitiy . id } capabilitiy = { capabilitiy } />
161161 ) )
162162 ) }
163163 < div ref = { sentinelRef } />
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ export type Balance = {
2828}
2929
3030export type TAgent = {
31+ id : string
3132 name : string
3233 domain : string
3334 title : string | null
You can’t perform that action at this time.
0 commit comments