Skip to content

Commit 67c230c

Browse files
authored
docs(react-sdk): fix docs for useSendFeedback() (#443)
1 parent 9e36f21 commit 67c230c

File tree

3 files changed

+4
-12
lines changed

3 files changed

+4
-12
lines changed

packages/browser-sdk/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ Feedback can be submitted to Bucket using the SDK:
282282

283283
```ts
284284
bucketClient.feedback({
285-
featureId: "my_feature_id", // String (required), copy from Feature feedback tab
285+
featureKey: "my-feature-key", // String (required), copy from Feature feedback tab
286286
score: 5, // Number: 1-5 (optional)
287287
comment: "Absolutely stellar work!", // String (optional)
288288
});
@@ -292,7 +292,7 @@ bucketClient.feedback({
292292

293293
If you are not using the Bucket Browser SDK, you can still submit feedback using the HTTP API.
294294

295-
See details in [Feedback HTTP API](https://docs.bucket.co/reference/http-tracking-api#feedback)
295+
See details in [Feedback HTTP API](https://docs.bucket.co/api/http-api#post-feedback)
296296

297297
## Tracking feature usage
298298

packages/react-sdk/README.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -347,13 +347,9 @@ function CustomFeedbackForm() {
347347

348348
const handleSubmit = async (data: FormData) => {
349349
await sendFeedback({
350-
featureId: "bucket-feature-id",
350+
featureKey: "bucket-feature-key",
351351
score: parseInt(data.get("score") as string),
352352
comment: data.get("comment") as string,
353-
metadata: {
354-
source: "custom-form",
355-
userRole: "admin",
356-
},
357353
});
358354
};
359355

packages/vue-sdk/README.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -280,13 +280,9 @@ const sendFeedback = useSendFeedback();
280280
281281
const handleSubmit = async (data: FormData) => {
282282
await sendFeedback({
283-
featureId: "bucket-feature-id",
283+
featureKey: "bucket-feature-key",
284284
score: parseInt(data.get("score") as string),
285285
comment: data.get("comment") as string,
286-
metadata: {
287-
source: "custom-form",
288-
userRole: "admin",
289-
},
290286
});
291287
};
292288
</script>

0 commit comments

Comments
 (0)