@skroz/frontend 0.0.3 → 0.0.5
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/auth/Forgot.js +2 -2
- package/dist/graphql/ForgotPasswordMutation.graphql.d.ts +1 -1
- package/dist/graphql/ForgotPasswordMutation.graphql.js +2 -2
- package/package.json +2 -2
- package/src/auth/Forgot.tsx +2 -2
- package/src/auth/Register.tsx +1 -1
- package/src/graphql/ForgotPasswordMutation.graphql.ts +3 -3
package/dist/auth/Forgot.js
CHANGED
|
@@ -46,8 +46,8 @@ var Forgot = function (_a) {
|
|
|
46
46
|
},
|
|
47
47
|
onError: function (error) { return (0, handleFormErrors_1.default)(form, error); },
|
|
48
48
|
onCompleted: function (res) {
|
|
49
|
-
(0, limitExpiresAt_1.setLimitExpiresAt)(res.forgotPassword.limitExpiresAt);
|
|
50
|
-
if (!res.forgotPassword.
|
|
49
|
+
(0, limitExpiresAt_1.setLimitExpiresAt)(res.forgotPassword.limitExpiresAt || 0);
|
|
50
|
+
if (!res.forgotPassword.codeIsSent)
|
|
51
51
|
antd_1.message.error(t('common:auth.forgotSendError'));
|
|
52
52
|
router.push("/recovery?email=".concat(email));
|
|
53
53
|
onFinish();
|
|
@@ -12,8 +12,8 @@ export type ForgotPasswordMutation$variables = {
|
|
|
12
12
|
};
|
|
13
13
|
export type ForgotPasswordMutation$data = {
|
|
14
14
|
readonly forgotPassword: {
|
|
15
|
+
readonly codeIsSent: boolean;
|
|
15
16
|
readonly limitExpiresAt: number;
|
|
16
|
-
readonly recoveryLinkIsSent: boolean;
|
|
17
17
|
};
|
|
18
18
|
};
|
|
19
19
|
export type ForgotPasswordMutation = {
|
|
@@ -31,7 +31,7 @@ var node = (function () {
|
|
|
31
31
|
"alias": null,
|
|
32
32
|
"args": null,
|
|
33
33
|
"kind": "ScalarField",
|
|
34
|
-
"name": "
|
|
34
|
+
"name": "codeIsSent",
|
|
35
35
|
"storageKey": null
|
|
36
36
|
},
|
|
37
37
|
{
|
|
@@ -68,7 +68,7 @@ var node = (function () {
|
|
|
68
68
|
"metadata": {},
|
|
69
69
|
"name": "ForgotPasswordMutation",
|
|
70
70
|
"operationKind": "mutation",
|
|
71
|
-
"text": "mutation ForgotPasswordMutation(\n $input: ForgotPasswordInput!\n) {\n forgotPassword(input: $input) {\n
|
|
71
|
+
"text": "mutation ForgotPasswordMutation(\n $input: ForgotPasswordInput!\n) {\n forgotPassword(input: $input) {\n codeIsSent\n limitExpiresAt\n }\n}\n"
|
|
72
72
|
}
|
|
73
73
|
};
|
|
74
74
|
})();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skroz/frontend",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "src/index.ts",
|
|
6
6
|
"types": "src/index.ts",
|
|
@@ -44,5 +44,5 @@
|
|
|
44
44
|
"publishConfig": {
|
|
45
45
|
"access": "public"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "49e4b60af88db3e07b62591aed5d8086bd1f4c34"
|
|
48
48
|
}
|
package/src/auth/Forgot.tsx
CHANGED
|
@@ -43,8 +43,8 @@ const Forgot: React.FC<ForgotProps> = ({ onFinish, onLoginClick }) => {
|
|
|
43
43
|
},
|
|
44
44
|
onError: (error) => handleFormErrors(form, error),
|
|
45
45
|
onCompleted: (res: ForgotPasswordMutation$data) => {
|
|
46
|
-
setLimitExpiresAt(res.forgotPassword.limitExpiresAt);
|
|
47
|
-
if (!res.forgotPassword.
|
|
46
|
+
setLimitExpiresAt(res.forgotPassword.limitExpiresAt || 0);
|
|
47
|
+
if (!res.forgotPassword.codeIsSent)
|
|
48
48
|
message.error(t('common:auth.forgotSendError'));
|
|
49
49
|
router.push(`/recovery?email=${email}`);
|
|
50
50
|
onFinish();
|
package/src/auth/Register.tsx
CHANGED
|
@@ -4,7 +4,7 @@ import { useRouter } from 'next/router';
|
|
|
4
4
|
import { useTranslation } from 'next-i18next';
|
|
5
5
|
import Link from 'next/link';
|
|
6
6
|
import { useExistingForm } from '@os-design/form';
|
|
7
|
-
import {
|
|
7
|
+
import { useMutation } from 'react-relay';
|
|
8
8
|
import handleFormErrors from '../utils/handleFormErrors';
|
|
9
9
|
import AuthFooterLinks from './AuthFooterLinks';
|
|
10
10
|
import H from '../ui/H';
|
|
@@ -17,8 +17,8 @@ export type ForgotPasswordMutation$variables = {
|
|
|
17
17
|
};
|
|
18
18
|
export type ForgotPasswordMutation$data = {
|
|
19
19
|
readonly forgotPassword: {
|
|
20
|
+
readonly codeIsSent: boolean;
|
|
20
21
|
readonly limitExpiresAt: number;
|
|
21
|
-
readonly recoveryLinkIsSent: boolean;
|
|
22
22
|
};
|
|
23
23
|
};
|
|
24
24
|
export type ForgotPasswordMutation = {
|
|
@@ -53,7 +53,7 @@ const node: ConcreteRequest = (function () {
|
|
|
53
53
|
"alias": null,
|
|
54
54
|
"args": null,
|
|
55
55
|
"kind": "ScalarField",
|
|
56
|
-
"name": "
|
|
56
|
+
"name": "codeIsSent",
|
|
57
57
|
"storageKey": null
|
|
58
58
|
},
|
|
59
59
|
{
|
|
@@ -90,7 +90,7 @@ const node: ConcreteRequest = (function () {
|
|
|
90
90
|
"metadata": {},
|
|
91
91
|
"name": "ForgotPasswordMutation",
|
|
92
92
|
"operationKind": "mutation",
|
|
93
|
-
"text": "mutation ForgotPasswordMutation(\n $input: ForgotPasswordInput!\n) {\n forgotPassword(input: $input) {\n
|
|
93
|
+
"text": "mutation ForgotPasswordMutation(\n $input: ForgotPasswordInput!\n) {\n forgotPassword(input: $input) {\n codeIsSent\n limitExpiresAt\n }\n}\n"
|
|
94
94
|
}
|
|
95
95
|
};
|
|
96
96
|
})();
|