@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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umituz/react-native-subscription",
3
- "version": "2.38.3",
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",
@@ -16,5 +16,6 @@ export interface PaywallFeedbackModalProps {
16
16
  translations: PaywallFeedbackTranslations;
17
17
  visible: boolean;
18
18
  onClose: () => void;
19
- onSubmit: (reason: string) => void;
19
+ onSubmit: (data: { reason: string; otherText?: string }) => void;
20
20
  }
21
+
@@ -188,6 +188,6 @@ const createScreenStyles = (tokens: any, insets: any) => ({
188
188
  alignItems: 'center' as const,
189
189
  },
190
190
  submitText: {
191
- fontWeight: "600",
191
+ fontWeight: 600,
192
192
  },
193
193
  });
@@ -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
- const finalReason =
19
- selectedReason === "other" && otherText.trim().length > 0
20
- ? `other: ${otherText.trim()}`
21
- : selectedReason;
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();