File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed 
packages/connect-react/examples/nextjs/src/app Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change 66  ComponentFormContainer ,  FrontendClientProvider , 
77}  from  "@pipedream/connect-react" ; 
88import  {  fetchToken  }  from  "./actions" ; 
9- import  {  DynamicProps  }  from  "../../../../src" ; 
109
1110export  default  function  Home ( )  { 
1211  const  userId  =  "my-authed-user-id" ; 
@@ -23,9 +22,13 @@ export default function Home() {
2322  } ) ; 
2423
2524  const  [ 
26-     dynamicProps , 
27-     setDynamicProps , 
28-   ]  =  useState < DynamicProps < { } > > ( ) ; 
25+     dynamicPropsId , 
26+     setDynamicPropsId , 
27+   ]  =  useState < string  |  undefined > ( ) ; 
28+ 
29+   const  handleDynamicProps  =  ( dynamicProps : {  id : string  |  undefined  } )  =>  { 
30+     setDynamicPropsId ( dynamicProps . id ) 
31+   } 
2932
3033  return  ( 
3134    < > 
@@ -35,15 +38,15 @@ export default function Home() {
3538          userId = { userId } 
3639          componentKey = "slack-send-message" 
3740          configuredProps = { configuredProps } 
38-           onUpdateDynamicProps = { setDynamicProps } 
41+           onUpdateDynamicProps = { handleDynamicProps } 
3942          onUpdateConfiguredProps = { setConfiguredProps } 
4043          onSubmit = { async  ( )  =>  { 
4144            try  { 
4245              await  client . actionRun ( { 
4346                userId, 
4447                actionId : "slack-send-message" , 
4548                configuredProps, 
46-                 dynamicPropsId :  dynamicProps ?. id , 
49+                 dynamicPropsId, 
4750              } ) ; 
4851            }  catch  ( error )  { 
4952              console . error ( "Action run failed:" ,  error ) ; 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments