@matchain/matchid-sdk-react 0.1.56-alpha.12 → 0.1.56-alpha.14

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.
Files changed (57) hide show
  1. package/dist/api.d.mts +2 -2
  2. package/dist/api.d.ts +2 -2
  3. package/dist/api.js +83 -44
  4. package/dist/api.js.map +1 -1
  5. package/dist/api.mjs +2 -2
  6. package/dist/{chunk-DUSDBXBT.mjs → chunk-EMSBFHPM.mjs} +174 -124
  7. package/dist/chunk-EMSBFHPM.mjs.map +1 -0
  8. package/dist/{chunk-44JQQ34F.mjs → chunk-SEACJPL6.mjs} +2 -2
  9. package/dist/components.d.mts +3 -3
  10. package/dist/components.d.ts +3 -3
  11. package/dist/components.js +161 -122
  12. package/dist/components.js.map +1 -1
  13. package/dist/components.mjs +1 -1
  14. package/dist/hooks.d.mts +2 -2
  15. package/dist/hooks.d.ts +2 -2
  16. package/dist/hooks.js +39 -0
  17. package/dist/hooks.js.map +1 -1
  18. package/dist/hooks.mjs +1 -1
  19. package/dist/icon.d.mts +2 -2
  20. package/dist/icon.d.ts +2 -2
  21. package/dist/{index-DxHhOW24.d.mts → index-BLjGmf9p.d.mts} +2 -2
  22. package/dist/{index-BNqdFiOo.d.ts → index-BXhXRggh.d.ts} +1 -1
  23. package/dist/{index-uB9jBjgs.d.mts → index-Bjb30oE3.d.mts} +35 -31
  24. package/dist/{index-hz9v-CNJ.d.ts → index-CPnKc6o4.d.ts} +35 -31
  25. package/dist/{index-CcVHENNv.d.ts → index-CpJtux-G.d.ts} +1 -1
  26. package/dist/{index-DVlulZhE.d.mts → index-CqHlL6ue.d.mts} +3 -3
  27. package/dist/{index-DkijpM5Q.d.mts → index-CzCkxwOm.d.mts} +1 -1
  28. package/dist/{index-84CqVi2I.d.mts → index-DCyE39bg.d.mts} +1 -1
  29. package/dist/{index-BctnHnJp.d.ts → index-DGsB7f2H.d.ts} +1 -1
  30. package/dist/{index-Cqdz_5bE.d.ts → index-DQYg6bEA.d.ts} +2 -2
  31. package/dist/{index-qmC4zt6V.d.ts → index-DZpXCByF.d.ts} +3 -3
  32. package/dist/{index-Car1jFyN.d.mts → index-De8efmdb.d.mts} +1 -1
  33. package/dist/{index-BqI0PEIi.d.mts → index-DuCefmJ0.d.mts} +1 -1
  34. package/dist/{index-CvzpMw3N.d.ts → index-m2bn_W3Y.d.ts} +1 -1
  35. package/dist/index.css +1 -1
  36. package/dist/index.d.mts +8 -8
  37. package/dist/index.d.ts +8 -8
  38. package/dist/index.js +173 -123
  39. package/dist/index.js.map +1 -1
  40. package/dist/index.mjs +2 -2
  41. package/dist/{types-BrVeC0c8.d.mts → types-C8FLH1yn.d.mts} +1 -0
  42. package/dist/{types-BrVeC0c8.d.ts → types-C8FLH1yn.d.ts} +1 -0
  43. package/dist/types.d.mts +1 -1
  44. package/dist/types.d.ts +1 -1
  45. package/dist/ui.d.mts +3 -3
  46. package/dist/ui.d.ts +3 -3
  47. package/dist/ui.js +6 -0
  48. package/dist/ui.js.map +1 -1
  49. package/dist/ui.mjs +1 -1
  50. package/example/src/App.tsx +61 -61
  51. package/example/src/config/index.ts +8 -6
  52. package/example/src/pages/Home.tsx +15 -15
  53. package/example/src/store/useLocalStore.ts +19 -19
  54. package/example/yarn.lock +1384 -0
  55. package/package.json +1 -1
  56. package/dist/chunk-DUSDBXBT.mjs.map +0 -1
  57. /package/dist/{chunk-44JQQ34F.mjs.map → chunk-SEACJPL6.mjs.map} +0 -0
@@ -11,7 +11,7 @@ import {
11
11
  useUserInfo,
12
12
  verifyPohApi,
13
13
  wallet_exports
14
- } from "./chunk-DUSDBXBT.mjs";
14
+ } from "./chunk-EMSBFHPM.mjs";
15
15
  import {
16
16
  __export
17
17
  } from "./chunk-J5LGTIGS.mjs";
@@ -94,4 +94,4 @@ export {
94
94
  user_exports,
95
95
  api_exports
96
96
  };
97
- //# sourceMappingURL=chunk-44JQQ34F.mjs.map
97
+ //# sourceMappingURL=chunk-SEACJPL6.mjs.map
@@ -1,6 +1,6 @@
1
- export { B as BTCModal, d as EVMModal, E as EmailModal, L as LoginBox, a as LoginButton, c as LoginModal, b as LoginPanel, e as TONModal, T as TRONModal, g as TokenDetail, h as TokenSend, j as TokenSendList, k as TransactionList, U as UsernameModal, f as WalletAsset, W as WalletModal } from './index-DVlulZhE.mjs';
2
- export { B as Button, F as Field, I as Input, M as Modal, a as ModalWithHeader, O as Overlay, P as Popover } from './index-BqI0PEIi.mjs';
1
+ export { B as BTCModal, d as EVMModal, E as EmailModal, L as LoginBox, a as LoginButton, c as LoginModal, b as LoginPanel, e as TONModal, T as TRONModal, g as TokenDetail, h as TokenSend, j as TokenSendList, k as TransactionList, U as UsernameModal, f as WalletAsset, W as WalletModal } from './index-CqHlL6ue.mjs';
2
+ export { B as Button, F as Field, I as Input, M as Modal, a as ModalWithHeader, O as Overlay, P as Popover } from './index-DuCefmJ0.mjs';
3
3
  import 'react/jsx-runtime';
4
- import './types-BrVeC0c8.mjs';
4
+ import './types-C8FLH1yn.mjs';
5
5
  import 'react';
6
6
  import '@tanstack/react-query/src/types';
@@ -1,6 +1,6 @@
1
- export { B as BTCModal, d as EVMModal, E as EmailModal, L as LoginBox, a as LoginButton, c as LoginModal, b as LoginPanel, e as TONModal, T as TRONModal, g as TokenDetail, h as TokenSend, j as TokenSendList, k as TransactionList, U as UsernameModal, f as WalletAsset, W as WalletModal } from './index-qmC4zt6V.js';
2
- export { B as Button, F as Field, I as Input, M as Modal, a as ModalWithHeader, O as Overlay, P as Popover } from './index-CvzpMw3N.js';
1
+ export { B as BTCModal, d as EVMModal, E as EmailModal, L as LoginBox, a as LoginButton, c as LoginModal, b as LoginPanel, e as TONModal, T as TRONModal, g as TokenDetail, h as TokenSend, j as TokenSendList, k as TransactionList, U as UsernameModal, f as WalletAsset, W as WalletModal } from './index-DZpXCByF.js';
2
+ export { B as Button, F as Field, I as Input, M as Modal, a as ModalWithHeader, O as Overlay, P as Popover } from './index-m2bn_W3Y.js';
3
3
  import 'react/jsx-runtime';
4
- import './types-BrVeC0c8.js';
4
+ import './types-C8FLH1yn.js';
5
5
  import 'react';
6
6
  import '@tanstack/react-query/src/types';
@@ -3284,6 +3284,12 @@ var useWalletModalStore = (0, import_zustand5.create)((set) => ({
3284
3284
  open: (type, methods = DEFAULT_WALLET_METHODS) => set({ isOpen: true, type, methods }),
3285
3285
  close: () => set({ isOpen: false })
3286
3286
  }));
3287
+ var useEmailModalStore = (0, import_zustand5.create)((set) => ({
3288
+ isOpen: false,
3289
+ type: "login",
3290
+ open: (type) => set({ isOpen: true, type }),
3291
+ close: () => set({ isOpen: false })
3292
+ }));
3287
3293
 
3288
3294
  // src/components/CEXBindModal/index.tsx
3289
3295
  var import_react19 = require("react");
@@ -3362,6 +3368,7 @@ function useUserInfo() {
3362
3368
  const { open: TONOpen } = useTONModalStore();
3363
3369
  const { open: BTCOpen } = useBTCModalStore();
3364
3370
  const { open: CEXBindOpen } = useCEXBindModalStore();
3371
+ const { open: EmailOpen } = useEmailModalStore();
3365
3372
  const walletModalStore = useWalletModalStore();
3366
3373
  const getRedirectUri = () => {
3367
3374
  return encodeURIComponent(window.location.href);
@@ -3496,6 +3503,34 @@ function useUserInfo() {
3496
3503
  }
3497
3504
  return false;
3498
3505
  };
3506
+ const bindByEmail = async ({
3507
+ email,
3508
+ code
3509
+ }) => {
3510
+ try {
3511
+ const obj = {
3512
+ email,
3513
+ verification_key: emailLoginKey,
3514
+ verification_code: code
3515
+ };
3516
+ const res = await verifyEmailCodeApi(obj);
3517
+ if (res && res.data && isSuccess(res)) {
3518
+ events.onBind && events.onBind({
3519
+ type: "email"
3520
+ });
3521
+ eventManager_default.emit("onBind", {
3522
+ type: "email"
3523
+ });
3524
+ return true;
3525
+ } else {
3526
+ throw new Error(res.message);
3527
+ }
3528
+ } catch (error) {
3529
+ console.error("bindByEmail", error);
3530
+ throw error;
3531
+ }
3532
+ return false;
3533
+ };
3499
3534
  const bindWallet = async () => {
3500
3535
  if (!token) {
3501
3536
  throw new Error("You must login first");
@@ -3543,12 +3578,15 @@ function useUserInfo() {
3543
3578
  return BTCOpen("bind");
3544
3579
  case "telegram":
3545
3580
  return await bindTelegram();
3581
+ case "email":
3582
+ return EmailOpen("bind");
3546
3583
  case "twitter":
3547
3584
  case "google":
3548
3585
  case "discord":
3549
3586
  case "github":
3550
3587
  case "linkedin":
3551
3588
  case "facebook":
3589
+ case "kakao":
3552
3590
  case "youtube":
3553
3591
  const link = `${endpoints.back}api/v1/auth/${method == "youtube" ? "google" : method}?appid=${appid}&provider=${method == "youtube" ? "google" : method}&redirect=${encodeURIComponent(endpoints.auth + "bind/" + method)}&authorization=${token.includes("Bearer ") ? token.split(" ")[1] : token}${method == "youtube" ? "&auth_type=youtube" : ""}`;
3554
3592
  matchlog_default.log("link", link);
@@ -3632,6 +3670,7 @@ function useUserInfo() {
3632
3670
  auth,
3633
3671
  login: loginMethod,
3634
3672
  bind,
3673
+ bindByEmail,
3635
3674
  getAuthInfo,
3636
3675
  invite
3637
3676
  };
@@ -3643,7 +3682,7 @@ var import_react_intl8 = require("react-intl");
3643
3682
  var import_jsx_runtime84 = require("react/jsx-runtime");
3644
3683
  function StepVerify(props) {
3645
3684
  const intl = (0, import_react_intl8.useIntl)();
3646
- const { getLoginEmailCode, loginByEmail } = useUserInfo();
3685
+ const { getLoginEmailCode, bindByEmail, loginByEmail } = useUserInfo();
3647
3686
  const [error, setError] = (0, import_react24.useState)("");
3648
3687
  const [code, setCode] = (0, import_react24.useState)("");
3649
3688
  const [sending, setSending] = (0, import_react24.useState)(false);
@@ -3703,7 +3742,10 @@ function StepVerify(props) {
3703
3742
  try {
3704
3743
  setError("");
3705
3744
  setSubmitting(true);
3706
- const res = await loginByEmail({
3745
+ const res = props.type === "bind" ? await bindByEmail({
3746
+ email: props.email,
3747
+ code
3748
+ }) : await loginByEmail({
3707
3749
  email: props.email,
3708
3750
  code
3709
3751
  });
@@ -3765,6 +3807,7 @@ var import_react_intl9 = require("react-intl");
3765
3807
  var import_jsx_runtime85 = require("react/jsx-runtime");
3766
3808
  function EmailModal({
3767
3809
  isOpen = false,
3810
+ type = "login",
3768
3811
  width = 480,
3769
3812
  onClose,
3770
3813
  onBack,
@@ -3779,6 +3822,16 @@ function EmailModal({
3779
3822
  setEmailVal("");
3780
3823
  }
3781
3824
  }, [isOpen]);
3825
+ const verifySuccess = () => {
3826
+ console.log("verifySuccess", onLogin);
3827
+ if (onLogin) {
3828
+ console.log("verifySuccess to login");
3829
+ onLogin();
3830
+ } else {
3831
+ console.log("verifySuccess to close");
3832
+ onClose && onClose();
3833
+ }
3834
+ };
3782
3835
  return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
3783
3836
  ModalWithHeader,
3784
3837
  {
@@ -3792,7 +3845,7 @@ function EmailModal({
3792
3845
  children: step === "input" ? /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(StepEmail, { email: emailVal, onContinue: (email) => {
3793
3846
  setEmailVal(email);
3794
3847
  setStep("verify");
3795
- } }) : /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(StepVerify, { email: emailVal, onSuccess: onLogin })
3848
+ } }) : /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(StepVerify, { email: emailVal, type, onSuccess: verifySuccess })
3796
3849
  }
3797
3850
  );
3798
3851
  }
@@ -3911,7 +3964,7 @@ function LoginBox({
3911
3964
  walletMethods: walletMethodList
3912
3965
  };
3913
3966
  }, [config.platform, recommendMethods, methods, walletMethods]);
3914
- const [emailOpen, setEmailOpen] = (0, import_react26.useState)(false);
3967
+ const { open: emailOpen } = useEmailModalStore();
3915
3968
  const { login } = useUserInfo();
3916
3969
  const [showWallet, setShowWallet] = (0, import_react26.useState)(false);
3917
3970
  const intl = (0, import_react_intl10.useIntl)();
@@ -3927,7 +3980,7 @@ function LoginBox({
3927
3980
  icon: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(EmailIcon, { size: isDownMd ? 36 : 40 }),
3928
3981
  name: intl.formatMessage({ id: "email" }),
3929
3982
  onClick: () => {
3930
- setEmailOpen(true);
3983
+ emailOpen("login");
3931
3984
  }
3932
3985
  },
3933
3986
  google: {
@@ -3977,130 +4030,116 @@ function LoginBox({
3977
4030
  }
3978
4031
  };
3979
4032
  const { walletMap } = useWalletConfig();
3980
- return /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(import_jsx_runtime86.Fragment, { children: [
3981
- (!inModal || !emailOpen) && /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "matchid-login-box", children: [
3982
- /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "matchid-login-recommend-list", children: methodConfig.recommendMethods.map((m) => {
3983
- return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
3984
- RecommendItem,
3985
- {
3986
- icon: methodMap[m]?.icon,
3987
- name: methodMap[m]?.name,
3988
- onClick: methodMap[m]?.onClick,
3989
- showChildren: m == "wallet" && showWallet,
3990
- children: m == "wallet" && /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(import_jsx_runtime86.Fragment, { children: [
3991
- /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "matchid-login-recommend-wallet-divider" }),
3992
- /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "matchid-login-recommend-wallet-list", children: methodConfig.walletMethods.map((n) => {
3993
- const m2 = walletMap[n];
3994
- return /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(
3995
- "div",
3996
- {
3997
- className: "matchid-login-recommend-wallet-item",
3998
- onClick: () => {
3999
- login(m2.method);
4000
- },
4001
- children: [
4002
- /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "matchid-login-recommend-wallet-item-content", children: [
4003
- /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "matchid-login-recommend-wallet-item-icon", children: m2.icon }),
4004
- /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
4005
- "div",
4006
- {
4007
- className: "matchid-login-recommend-wallet-item-hover-icon",
4008
- children: m2.activeIcon
4009
- }
4010
- ),
4011
- /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
4012
- "span",
4013
- {
4014
- className: "matchid-login-recommend-wallet-item-name",
4015
- children: m2.name
4016
- }
4017
- )
4018
- ] }),
4033
+ return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_jsx_runtime86.Fragment, { children: (!inModal || !emailOpen) && /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "matchid-login-box", children: [
4034
+ /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "matchid-login-recommend-list", children: methodConfig.recommendMethods.map((m) => {
4035
+ return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
4036
+ RecommendItem,
4037
+ {
4038
+ icon: methodMap[m]?.icon,
4039
+ name: methodMap[m]?.name,
4040
+ onClick: methodMap[m]?.onClick,
4041
+ showChildren: m == "wallet" && showWallet,
4042
+ children: m == "wallet" && /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(import_jsx_runtime86.Fragment, { children: [
4043
+ /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "matchid-login-recommend-wallet-divider" }),
4044
+ /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "matchid-login-recommend-wallet-list", children: methodConfig.walletMethods.map((n) => {
4045
+ const m2 = walletMap[n];
4046
+ return /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(
4047
+ "div",
4048
+ {
4049
+ className: "matchid-login-recommend-wallet-item",
4050
+ onClick: () => {
4051
+ login(m2.method);
4052
+ },
4053
+ children: [
4054
+ /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "matchid-login-recommend-wallet-item-content", children: [
4055
+ /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "matchid-login-recommend-wallet-item-icon", children: m2.icon }),
4019
4056
  /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
4020
- ArrowRightIcon,
4057
+ "div",
4021
4058
  {
4022
- className: "matchid-login-recommend-wallet-item-arrow",
4023
- size: 20,
4024
- color: "var(--matchid-arrow-color)"
4059
+ className: "matchid-login-recommend-wallet-item-hover-icon",
4060
+ children: m2.activeIcon
4061
+ }
4062
+ ),
4063
+ /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
4064
+ "span",
4065
+ {
4066
+ className: "matchid-login-recommend-wallet-item-name",
4067
+ children: m2.name
4025
4068
  }
4026
4069
  )
4027
- ]
4028
- },
4029
- m2.name
4030
- );
4031
- }) })
4032
- ] })
4033
- },
4034
- m
4035
- );
4036
- }) }),
4037
- /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "matchid-privacy-policy", children: [
4038
- /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "matchid-privacy-policy-content", children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
4039
- import_react_intl10.FormattedMessage,
4040
- {
4041
- id: "loginAgreement",
4042
- values: {
4043
- termsLink: (chunks) => /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
4044
- "a",
4045
- {
4046
- href: TERMS_OF_SERVICE_URL,
4047
- target: "_blank",
4048
- rel: "noopener noreferrer",
4049
- className: "matchid-privacy-policy-content-link",
4050
- children: chunks
4051
- }
4052
- ),
4053
- privacyLink: (chunks) => /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
4054
- "a",
4055
- {
4056
- href: PRIVACY_POLICY_URL,
4057
- target: "_blank",
4058
- rel: "noopener noreferrer",
4059
- className: "matchid-privacy-policy-content-link",
4060
- children: chunks
4061
- }
4062
- )
4063
- }
4070
+ ] }),
4071
+ /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
4072
+ ArrowRightIcon,
4073
+ {
4074
+ className: "matchid-login-recommend-wallet-item-arrow",
4075
+ size: 20,
4076
+ color: "var(--matchid-arrow-color)"
4077
+ }
4078
+ )
4079
+ ]
4080
+ },
4081
+ m2.name
4082
+ );
4083
+ }) })
4084
+ ] })
4085
+ },
4086
+ m
4087
+ );
4088
+ }) }),
4089
+ /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "matchid-privacy-policy", children: [
4090
+ /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "matchid-privacy-policy-content", children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
4091
+ import_react_intl10.FormattedMessage,
4092
+ {
4093
+ id: "loginAgreement",
4094
+ values: {
4095
+ termsLink: (chunks) => /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
4096
+ "a",
4097
+ {
4098
+ href: TERMS_OF_SERVICE_URL,
4099
+ target: "_blank",
4100
+ rel: "noopener noreferrer",
4101
+ className: "matchid-privacy-policy-content-link",
4102
+ children: chunks
4103
+ }
4104
+ ),
4105
+ privacyLink: (chunks) => /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
4106
+ "a",
4107
+ {
4108
+ href: PRIVACY_POLICY_URL,
4109
+ target: "_blank",
4110
+ rel: "noopener noreferrer",
4111
+ className: "matchid-privacy-policy-content-link",
4112
+ children: chunks
4113
+ }
4114
+ )
4064
4115
  }
4065
- ) }),
4066
- /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "matchid-privacy-policy-powered-by", children: [
4067
- /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_react_intl10.FormattedMessage, { id: "poweredBy" }),
4068
- /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(MatchIdIcon_default, {})
4069
- ] })
4070
- ] }),
4071
- methodConfig.methods.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "matchid-login-other", children: [
4072
- /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "matchid-login-other-line-box", children: [
4073
- /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "matchid-login-other-line" }),
4074
- /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "matchid-login-other-text", children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_react_intl10.FormattedMessage, { id: "otherLoginMethods" }) }),
4075
- /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "matchid-login-other-line" })
4076
- ] }),
4077
- /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "matchid-login-method-box", children: methodConfig.methods.map((m) => {
4078
- return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
4079
- "div",
4080
- {
4081
- className: "matchid-login-method-item",
4082
- onClick: methodMap[m]?.onClick,
4083
- title: methodMap[m]?.name,
4084
- children: methodMap[m]?.icon
4085
- },
4086
- m
4087
- );
4088
- }) })
4116
+ }
4117
+ ) }),
4118
+ /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "matchid-privacy-policy-powered-by", children: [
4119
+ /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_react_intl10.FormattedMessage, { id: "poweredBy" }),
4120
+ /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(MatchIdIcon_default, {})
4089
4121
  ] })
4090
4122
  ] }),
4091
- /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
4092
- EmailModal,
4093
- {
4094
- isOpen: emailOpen,
4095
- onClose: () => {
4096
- setEmailOpen(false);
4097
- },
4098
- onBack: inModal ? () => {
4099
- setEmailOpen(false);
4100
- } : void 0
4101
- }
4102
- )
4103
- ] });
4123
+ methodConfig.methods.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "matchid-login-other", children: [
4124
+ /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "matchid-login-other-line-box", children: [
4125
+ /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "matchid-login-other-line" }),
4126
+ /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "matchid-login-other-text", children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_react_intl10.FormattedMessage, { id: "otherLoginMethods" }) }),
4127
+ /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "matchid-login-other-line" })
4128
+ ] }),
4129
+ /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "matchid-login-method-box", children: methodConfig.methods.map((m) => {
4130
+ return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
4131
+ "div",
4132
+ {
4133
+ className: "matchid-login-method-item",
4134
+ onClick: methodMap[m]?.onClick,
4135
+ title: methodMap[m]?.name,
4136
+ children: methodMap[m]?.icon
4137
+ },
4138
+ m
4139
+ );
4140
+ }) })
4141
+ ] })
4142
+ ] }) });
4104
4143
  }
4105
4144
 
4106
4145
  // src/components/LoginButton/index.tsx