@doujins/payments-ui 0.0.8 → 0.0.10

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/dist/index.js CHANGED
@@ -1818,13 +1818,10 @@ var useSolanaQrPayment = (options) => {
1818
1818
  const resetState = useCallback(
1819
1819
  (message) => {
1820
1820
  clearTimers();
1821
- setIntent((prev) => prev ? null : prev);
1822
- setQrDataUri((prev) => prev ? null : prev);
1823
- setTimeRemaining((prev) => prev !== 0 ? 0 : prev);
1824
- setError((prev) => {
1825
- const next = message === void 0 ? null : message;
1826
- return prev === next ? prev : next;
1827
- });
1821
+ setIntent(null);
1822
+ setQrDataUri(null);
1823
+ setTimeRemaining(0);
1824
+ setError(message ?? null);
1828
1825
  },
1829
1826
  [clearTimers]
1830
1827
  );
@@ -2478,7 +2475,7 @@ var SolanaPaymentSelector = ({
2478
2475
  " Scan QR Code"
2479
2476
  ] })
2480
2477
  ] }),
2481
- /* @__PURE__ */ jsx(TabsContent, { value: "wallet", className: "mt-4", children: /* @__PURE__ */ jsx(
2478
+ /* @__PURE__ */ jsx(TabsContent, { value: "wallet", className: "mt-4", children: activeTab === "wallet" && /* @__PURE__ */ jsx(
2482
2479
  DirectPayment,
2483
2480
  {
2484
2481
  priceId,
@@ -2491,7 +2488,7 @@ var SolanaPaymentSelector = ({
2491
2488
  onPaymentError: handlePaymentError
2492
2489
  }
2493
2490
  ) }),
2494
- /* @__PURE__ */ jsx(TabsContent, { value: "qr", className: "mt-4", children: /* @__PURE__ */ jsx(
2491
+ /* @__PURE__ */ jsx(TabsContent, { value: "qr", className: "mt-4", children: activeTab === "qr" && /* @__PURE__ */ jsx(
2495
2492
  QRCodePayment,
2496
2493
  {
2497
2494
  priceId,