@daimo/pay 1.0.0 → 1.0.1

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/build/index.d.ts CHANGED
@@ -219,7 +219,7 @@ declare namespace DaimoPayButton {
219
219
  var Custom: typeof DaimoPayButtonCustom;
220
220
  }
221
221
  /** Like DaimoPayButton, but with custom styling. */
222
- declare function DaimoPayButtonCustom(props: DaimoPayButtonCustomProps): react_jsx_runtime.JSX.Element | null;
222
+ declare function DaimoPayButtonCustom(props: DaimoPayButtonCustomProps): React$1.ReactNode;
223
223
  declare namespace DaimoPayButtonCustom {
224
224
  var displayName: string;
225
225
  }
@@ -1,5 +1,5 @@
1
1
  var name = "@daimo/pay";
2
- var version = "1.0.0";
2
+ var version = "1.0.1";
3
3
  var author = "Daimo";
4
4
  var homepage = "https://pay.daimo.com";
5
5
  var license = "BSD-2-Clause license";
@@ -1,6 +1,5 @@
1
- import { jsx, Fragment } from 'react/jsx-runtime';
1
+ import { jsx } from 'react/jsx-runtime';
2
2
  import { useEffect } from 'react';
3
- import useIsMounted from '../../hooks/useIsMounted.js';
4
3
  import { usePayContext } from '../DaimoPay.js';
5
4
  import { TextContainer } from './styles.js';
6
5
  import { DaimoPayOrderMode, DaimoPayOrderStatusSource, writeDaimoPayOrderID, assertNotNull, DaimoPayIntentStatus } from '@daimo/common';
@@ -20,7 +19,6 @@ function DaimoPayButton(props) {
20
19
  }
21
20
  /** Like DaimoPayButton, but with custom styling. */
22
21
  function DaimoPayButtonCustom(props) {
23
- const isMounted = useIsMounted();
24
22
  const context = usePayContext();
25
23
  // Pre-load payment info in background.
26
24
  // Reload when any of the info changes.
@@ -89,9 +87,7 @@ function DaimoPayButtonCustom(props) {
89
87
  const modalOptions = { closeOnSuccess };
90
88
  const show = () => context.showPayment(modalOptions);
91
89
  const hide = () => context.setOpen(false);
92
- if (!isMounted)
93
- return null;
94
- return jsx(Fragment, { children: children({ show, hide }) });
90
+ return children({ show, hide });
95
91
  }
96
92
  DaimoPayButtonCustom.displayName = "DaimoPayButton.Custom";
97
93
  DaimoPayButton.Custom = DaimoPayButtonCustom;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@daimo/pay",
3
3
  "private": false,
4
- "version": "1.0.0",
4
+ "version": "1.0.1",
5
5
  "author": "Daimo",
6
6
  "homepage": "https://pay.daimo.com",
7
7
  "license": "BSD-2-Clause license",