Skip to content

Commit 1544552

Browse files
committed
Fix linter error
1 parent e7863c4 commit 1544552

File tree

1 file changed

+9
-6
lines changed
  • packages/connect-react/examples/nextjs/src/app

1 file changed

+9
-6
lines changed

packages/connect-react/examples/nextjs/src/app/page.tsx

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import {
66
ComponentFormContainer, FrontendClientProvider,
77
} from "@pipedream/connect-react";
88
import { fetchToken } from "./actions";
9-
import { DynamicProps } from "../../../../src";
109

1110
export 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);

0 commit comments

Comments
 (0)