@umituz/react-native-subscription 2.38.3 → 2.38.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/domains/subscription/presentation/components/feedback/PaywallFeedbackModal.tsx +2 -1
- package/src/domains/subscription/presentation/components/feedback/PaywallFeedbackModal.types.ts +2 -1
- package/src/domains/subscription/presentation/components/feedback/PaywallFeedbackScreen.tsx +1 -1
- package/src/presentation/hooks/feedback/usePaywallFeedback.ts +5 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umituz/react-native-subscription",
|
|
3
|
-
"version": "2.38.
|
|
3
|
+
"version": "2.38.4",
|
|
4
4
|
"description": "Complete subscription management with RevenueCat, paywall UI, and credits system for React Native apps",
|
|
5
5
|
"main": "./src/index.ts",
|
|
6
6
|
"types": "./src/index.ts",
|
|
@@ -7,8 +7,9 @@ import { usePaywallFeedback } from "../../../../../presentation/hooks/feedback/u
|
|
|
7
7
|
import { createPaywallFeedbackStyles } from "./paywallFeedbackStyles";
|
|
8
8
|
import { FeedbackOption } from "./FeedbackOption";
|
|
9
9
|
import type { PaywallFeedbackTranslations, PaywallFeedbackModalProps } from "./PaywallFeedbackModal.types";
|
|
10
|
+
import type { PaywallFeedbackScreenProps } from "./PaywallFeedbackScreen.types";
|
|
10
11
|
|
|
11
|
-
export type { PaywallFeedbackTranslations, PaywallFeedbackModalProps };
|
|
12
|
+
export type { PaywallFeedbackTranslations, PaywallFeedbackModalProps, PaywallFeedbackScreenProps };
|
|
12
13
|
|
|
13
14
|
const FEEDBACK_OPTION_IDS = [
|
|
14
15
|
"too_expensive",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useState, useCallback } from "react";
|
|
2
2
|
|
|
3
3
|
interface UsePaywallFeedbackProps {
|
|
4
|
-
onSubmit: (reason: string) => void;
|
|
4
|
+
onSubmit: (data: { reason: string; otherText?: string }) => void;
|
|
5
5
|
onClose: () => void;
|
|
6
6
|
}
|
|
7
7
|
|
|
@@ -15,12 +15,10 @@ export const usePaywallFeedback = ({
|
|
|
15
15
|
const handleSubmit = useCallback(() => {
|
|
16
16
|
if (!selectedReason) return;
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
selectedReason
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
onSubmit(finalReason);
|
|
18
|
+
onSubmit({
|
|
19
|
+
reason: selectedReason,
|
|
20
|
+
otherText: selectedReason === "other" ? otherText.trim() : undefined,
|
|
21
|
+
});
|
|
24
22
|
setSelectedReason(null);
|
|
25
23
|
setOtherText("");
|
|
26
24
|
onClose();
|