File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
packages/connect-react/examples/nextjs/src/app Expand file tree Collapse file tree 1 file changed +8
-0
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" ;
910
1011export default function Home ( ) {
1112 const userId = "my-authed-user-id" ;
@@ -21,6 +22,11 @@ export default function Home() {
2122 text : "hello slack!" ,
2223 } ) ;
2324
25+ const [
26+ dynamicProps ,
27+ setDynamicProps ,
28+ ] = useState < DynamicProps < any > > ( ) ;
29+
2430 return (
2531 < >
2632 < div > My application</ div >
@@ -29,13 +35,15 @@ export default function Home() {
2935 userId = { userId }
3036 componentKey = "slack-send-message"
3137 configuredProps = { configuredProps }
38+ onUpdateDynamicProps = { setDynamicProps }
3239 onUpdateConfiguredProps = { setConfiguredProps }
3340 onSubmit = { async ( ) => {
3441 try {
3542 await client . actionRun ( {
3643 userId,
3744 actionId : "slack-send-message" ,
3845 configuredProps,
46+ dynamicPropsId : dynamicProps ?. id
3947 } ) ;
4048 } catch ( error ) {
4149 console . error ( "Action run failed:" , error ) ;
You can’t perform that action at this time.
0 commit comments