@metrifox/react-sdk 0.0.4 → 0.0.6

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/README.md CHANGED
@@ -21,18 +21,17 @@ yarn add @metrifox/react-sdk
21
21
 
22
22
  ## Setup
23
23
 
24
- Before using any SDK components, initialize it once with your API key (and optional base URL).
24
+ Before using any SDK components, initialize it once with your Client key.
25
25
 
26
26
  ```tsx
27
27
  import { metrifoxInit } from "@metrifox/react-sdk"
28
28
 
29
29
  metrifoxInit({
30
- apiKey:
31
- process.env.NEXT_PUBLIC_METRIFOX_API_KEY ||
32
- process.env.REACT_APP_METRIFOX_API_KEY ||
33
- import.meta.env?.VITE_METRIFOX_API_KEY ||
34
- "your-api-key",
35
- // baseUrl: "https://api.example.com" // Optional (defaults to Metrifox Cloud)
30
+ clientKey:
31
+ process.env.NEXT_PUBLIC_METRIFOX_APP_SECRET ||
32
+ process.env.REACT_APP_METRIFOX_APP_SECRET ||
33
+ import.meta.env?.VITE_METRIFOX_APP_SECRET ||
34
+ "your-client-key",
36
35
  })
37
36
  ```
38
37
 
@@ -92,15 +91,15 @@ The `sectionsConfig` prop controls what appears in the portal.
92
91
 
93
92
  Each portal section now renders inside a `<section id="...">` wrapper so you can link directly to segments of a customer portal view. The default anchor IDs are:
94
93
 
95
- | Anchor ID | Section Key |
96
- | ------------------ | ------------------ |
97
- | `#upcoming-invoice` | `upcomingInvoice` |
98
- | `#subscription` | `subscription` |
99
- | `#credit-balance` | `creditBalance` |
100
- | `#entitlement-usage`| `entitlementUsage`|
101
- | `#payment-overview` | `paymentOverview` |
102
- | `#billing-history` | `billingHistory` |
103
- | `#plan` | `plan` |
94
+ | Anchor ID | Section Key |
95
+ | -------------------- | ------------------ |
96
+ | `#upcoming-invoice` | `upcomingInvoice` |
97
+ | `#subscription` | `subscription` |
98
+ | `#credit-balance` | `creditBalance` |
99
+ | `#entitlement-usage` | `entitlementUsage` |
100
+ | `#payment-overview` | `paymentOverview` |
101
+ | `#billing-history` | `billingHistory` |
102
+ | `#plan` | `plan` |
104
103
 
105
104
  Use these anchors when embedding the SDK or sharing deep links (e.g., `https://app.example.com/portal#billing-history`).
106
105