@matchain/matchid-sdk-react 0.1.27 → 0.1.29

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.
@@ -1,6 +1,7 @@
1
1
  import React from "react";
2
2
  import {Hooks,Components} from "@matchain/matchid-sdk-react";
3
3
  import {LoginMethod} from "@/config";
4
+ import {LoginMethodType} from "../../../../src/types/types";
4
5
  const { useUserInfo} = Hooks
5
6
  const {EmailModal,LoginModal,LoginBox,LoginPanel} = Components
6
7
  export default function Login(){
@@ -27,7 +28,7 @@ export default function Login(){
27
28
  {
28
29
  LoginMethod.map((method) => {
29
30
  return <button key={method} className={`bg-gray-300 p-1 capitalize rounded`}
30
- onClick={() => login(method)}>{method}
31
+ onClick={() => login(method as LoginMethodType)}>{method}
31
32
  </button>
32
33
  })
33
34
  }
@@ -37,7 +38,14 @@ export default function Login(){
37
38
  }}/>
38
39
 
39
40
 
40
- <LoginModal isOpen={loginOpen} onClose={() => setLoginOpen(false)}/>
41
+ <LoginModal isOpen={loginOpen} onClose={() => setLoginOpen(false)} methods={[
42
+ 'telegram',
43
+ 'twitter',
44
+ 'discord',
45
+ 'github',
46
+ 'facebook',
47
+ 'linkedin'
48
+ ]}/>
41
49
 
42
50
  </div>
43
51
  <div className={`flex gap-5`}>
@@ -61,7 +69,7 @@ export default function Login(){
61
69
  </div>
62
70
  <div className={`font-bold text-lg`}>LoginPanel</div>
63
71
  <div className={`bg-gray-100 p-10`}>
64
- <div className={`bg-white`}><LoginPanel onClose={() => console.log('onLoginPanelClose')} methods={['discord','github','facebook','sol','linkedin']}/></div>
72
+ <div className={`bg-white`}><LoginPanel onClose={() => console.log('onLoginPanelClose')} methods={['telegram','twitter','discord','github','facebook','linkedin']}/></div>
65
73
  </div>
66
74
  </div>
67
75
  );
@@ -6,5 +6,6 @@ export const LoginMethod = [
6
6
  'telegram',
7
7
  'github',
8
8
  'discord',
9
- 'linkedin'
9
+ 'linkedin',
10
+ 'facebook'
10
11
  ]
@@ -2,6 +2,7 @@ import {Hooks, Components, Api} from "@matchain/matchid-sdk-react"
2
2
  import React from "react";
3
3
  import RoutePrivate from "../components/RoutePrivate";
4
4
  import {LoginMethod} from "@/config";
5
+ import {LoginMethodType} from "../../../src/types/types";
5
6
 
6
7
  const {useMatchEvents, useUserInfo, useWallet} = Hooks
7
8
  const {
@@ -100,7 +101,7 @@ function LoginContent() {
100
101
  {
101
102
  LoginMethod.map((method) => {
102
103
  return <button key={method} className={`bg-gray-300 p-1 capitalize rounded`}
103
- onClick={() => bind(method)}>Bind {method}
104
+ onClick={() => bind(method as LoginMethodType)}>Bind {method}
104
105
  </button>
105
106
  })
106
107
  }
@@ -140,7 +141,7 @@ export default function User() {
140
141
  <div className={`font-bold text-lg`}>LoginButton</div>
141
142
 
142
143
  <div className={`bg-gray-100 p-5 mt-5`}>
143
- <LoginButton methods={["evm", "twitter", "email", "google",'sol']} popoverPosition={"left"}/>
144
+ <LoginButton methods={[ "twitter", 'facebook',"discord","github","linkedin","telegram"]} popoverPosition={"left"}/>
144
145
  </div>
145
146
  <RoutePrivate>
146
147
  <LoginContent/>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@matchain/matchid-sdk-react",
3
- "version": "0.1.27",
3
+ "version": "0.1.29",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "exports": {