payment-kit 1.13.265 → 1.13.266
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/blocklet.yml
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "payment-kit",
|
|
3
|
-
"version": "1.13.
|
|
3
|
+
"version": "1.13.266",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"dev": "blocklet dev --open",
|
|
6
6
|
"eject": "vite eject",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"@arcblock/ux": "^2.9.80",
|
|
52
52
|
"@arcblock/validator": "^1.18.120",
|
|
53
53
|
"@blocklet/logger": "1.16.26",
|
|
54
|
-
"@blocklet/payment-react": "1.13.
|
|
54
|
+
"@blocklet/payment-react": "1.13.266",
|
|
55
55
|
"@blocklet/sdk": "1.16.26",
|
|
56
56
|
"@blocklet/ui-react": "^2.9.80",
|
|
57
57
|
"@blocklet/uploader": "^0.1.6",
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
"devDependencies": {
|
|
117
117
|
"@abtnode/types": "1.16.26",
|
|
118
118
|
"@arcblock/eslint-config-ts": "^0.3.0",
|
|
119
|
-
"@blocklet/payment-types": "1.13.
|
|
119
|
+
"@blocklet/payment-types": "1.13.266",
|
|
120
120
|
"@types/cookie-parser": "^1.4.7",
|
|
121
121
|
"@types/cors": "^2.8.17",
|
|
122
122
|
"@types/dotenv-flow": "^3.3.3",
|
|
@@ -155,5 +155,5 @@
|
|
|
155
155
|
"parser": "typescript"
|
|
156
156
|
}
|
|
157
157
|
},
|
|
158
|
-
"gitHead": "
|
|
158
|
+
"gitHead": "f6f7ee807560b4b9d01e6654b03cfaf1f523c167"
|
|
159
159
|
}
|
|
@@ -15,6 +15,7 @@ import { ArrowBackOutlined } from '@mui/icons-material';
|
|
|
15
15
|
import { LoadingButton } from '@mui/lab';
|
|
16
16
|
import { Alert, CircularProgress, Divider, Stack, Typography } from '@mui/material';
|
|
17
17
|
import { useRequest, useSetState } from 'ahooks';
|
|
18
|
+
import { useRef } from 'react';
|
|
18
19
|
import { useNavigate, useParams, useSearchParams } from 'react-router-dom';
|
|
19
20
|
|
|
20
21
|
import InfoCard from '../../../components/info-card';
|
|
@@ -55,6 +56,7 @@ export default function CustomerSubscriptionChangePlan() {
|
|
|
55
56
|
const { connect } = usePaymentContext();
|
|
56
57
|
const [searchParams] = useSearchParams();
|
|
57
58
|
const redirectUrl = searchParams.get('redirectUrl');
|
|
59
|
+
const confirmRef = useRef<HTMLButtonElement>(null);
|
|
58
60
|
|
|
59
61
|
const { loading, error, data } = useRequest(() => fetchData(id));
|
|
60
62
|
const [state, setState] = useSetState({
|
|
@@ -115,6 +117,8 @@ export default function CustomerSubscriptionChangePlan() {
|
|
|
115
117
|
});
|
|
116
118
|
|
|
117
119
|
setState({ priceId, ...result });
|
|
120
|
+
|
|
121
|
+
setTimeout(() => confirmRef.current?.scrollIntoView({ behavior: 'smooth' }), 100);
|
|
118
122
|
} catch (err) {
|
|
119
123
|
Toast.error(formatError(err));
|
|
120
124
|
setState({ priceId: '', total: '', due: '', setup: null, prorations: [], items: [] });
|
|
@@ -290,6 +294,7 @@ export default function CustomerSubscriptionChangePlan() {
|
|
|
290
294
|
{t('common.cancel')}
|
|
291
295
|
</LoadingButton>
|
|
292
296
|
<LoadingButton
|
|
297
|
+
ref={confirmRef}
|
|
293
298
|
onClick={handleConfirm}
|
|
294
299
|
variant="contained"
|
|
295
300
|
size="large"
|