@redzone/taunt-logins-ui-react 0.0.4 → 0.0.6
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/App.d.ts +2 -0
- package/dist/lib/index.d.ts +4 -0
- package/dist/lib/magic.d.ts +3 -0
- package/dist/lib/metamask.d.ts +3 -0
- package/dist/lib/tauntContext.d.ts +12 -0
- package/dist/lib/tauntProvider.d.ts +5 -0
- package/dist/main.d.ts +1 -0
- package/dist/taunt-logins-ui-react.d.ts +2 -0
- package/dist/taunt-logins-ui-react.js +3089 -0
- package/dist/taunt-logins-ui-react.js.map +1 -0
- package/dist/taunt-logins-ui-react.umd.cjs +7 -0
- package/dist/taunt-logins-ui-react.umd.cjs.map +1 -0
- package/package.json +25 -16
- package/.history/index_20251002141038.html +0 -13
- package/.history/index_20251002141344.html +0 -13
- package/.history/package_20251002154235.json +0 -32
- package/.history/package_20251002160110.json +0 -33
- package/.history/package_20251002161109.json +0 -33
- package/.history/package_20251002161124.json +0 -32
- package/.history/package_20251002161826.json +0 -32
- package/.history/package_20251002162139.json +0 -32
- package/.history/package_20251002162605.json +0 -35
- package/.history/package_20251002162619.json +0 -35
- package/.history/package_20251002162631.json +0 -35
- package/.history/package_20251002162639.json +0 -35
- package/.history/package_20251002162659.json +0 -35
- package/.history/package_20251002162811.json +0 -39
- package/.history/package_20251002162820.json +0 -39
- package/.history/src/App_20251002141038.tsx +0 -35
- package/.history/src/App_20251002142848.tsx +0 -15
- package/.history/src/App_20251002152540.tsx +0 -15
- package/.history/src/App_20251002152831.tsx +0 -17
- package/.history/src/App_20251002153145.tsx +0 -18
- package/.history/src/App_20251002153323.tsx +0 -25
- package/.history/src/App_20251002153420.tsx +0 -32
- package/.history/src/App_20251002153429.tsx +0 -33
- package/.history/src/App_20251002153457.tsx +0 -39
- package/.history/src/App_20251002153516.tsx +0 -39
- package/.history/src/App_20251002153520.tsx +0 -39
- package/.history/src/App_20251002153546.tsx +0 -41
- package/.history/src/App_20251002154625.tsx +0 -41
- package/.history/src/App_20251002154740.tsx +0 -47
- package/.history/src/App_20251002154812.tsx +0 -47
- package/.history/src/App_20251002154841.tsx +0 -47
- package/.history/src/App_20251002154915.tsx +0 -54
- package/.history/src/App_20251002160347.tsx +0 -54
- package/.history/src/lib/exports_20251002160004.ts +0 -0
- package/.history/src/lib/exports_20251002160045.ts +0 -3
- package/.history/src/lib/index_20251002162704.ts +0 -0
- package/.history/src/lib/index_20251002162712.ts +0 -1
- package/.history/src/lib/magic_20251002142829.tsx +0 -0
- package/.history/src/lib/magic_20251002142848.tsx +0 -44
- package/.history/src/lib/magic_20251002152540.tsx +0 -28
- package/.history/src/lib/magic_20251002152543.tsx +0 -28
- package/.history/src/lib/magic_20251002152546.tsx +0 -28
- package/.history/src/lib/magic_20251002152802.tsx +0 -47
- package/.history/src/lib/magic_20251002154740.tsx +0 -47
- package/.history/src/lib/magic_20251002155035.tsx +0 -47
- package/.history/src/lib/magic_20251002160411.tsx +0 -49
- package/.history/src/lib/magic_20251002160428.tsx +0 -49
- package/.history/src/lib/magic_20251002161028.tsx +0 -50
- package/.history/src/lib/magic_20251002162134.tsx +0 -50
- package/.history/src/lib/metamask_20251002141612.tsx +0 -0
- package/.history/src/lib/metamask_20251002142622.tsx +0 -38
- package/.history/src/lib/metamask_20251002142654.tsx +0 -41
- package/.history/src/lib/metamask_20251002142726.tsx +0 -44
- package/.history/src/lib/metamask_20251002142848.tsx +0 -0
- package/.history/src/lib/metamask_20251002152802.tsx +0 -28
- package/.history/src/lib/metamask_20251002153516.tsx +0 -27
- package/.history/src/lib/metamask_20251002154228.tsx +0 -27
- package/.history/src/lib/metamask_20251002154523.tsx +0 -27
- package/.history/src/lib/metamask_20251002162122.tsx +0 -27
- package/.history/src/lib/styling_20251002154448.css +0 -0
- package/.history/src/lib/styling_20251002154523.css +0 -19
- package/.history/src/lib/styling_20251002154531.css +0 -19
- package/.history/src/lib/styling_20251002154544.css +0 -20
- package/.history/src/lib/styling_20251002154548.css +0 -19
- package/.history/src/lib/styling_20251002160446.css +0 -20
- package/.history/src/lib/styling_20251002160511.css +0 -23
- package/.history/src/lib/styling_20251002160515.css +0 -24
- package/.history/src/lib/styling_20251002160815.css +0 -24
- package/.history/src/lib/styling_20251002160910.css +0 -24
- package/.history/src/lib/styling_20251002160915.css +0 -24
- package/.history/src/lib/styling_20251002160952.css +0 -24
- package/.history/src/lib/styling_20251002161001.css +0 -24
- package/.history/src/lib/styling_20251002161011.css +0 -24
- package/.history/src/lib/styling_20251002161016.css +0 -24
- package/.history/src/lib/styling_20251002161036.css +0 -25
- package/.history/src/lib/tauntContext_20251002142359.ts +0 -0
- package/.history/src/lib/tauntContext_20251002142622.ts +0 -17
- package/.history/src/lib/tauntContext_20251002152540.ts +0 -22
- package/.history/src/lib/tauntContext_20251002152802.ts +0 -22
- package/.history/src/lib/tauntProvider_20251002142503.tsx +0 -0
- package/.history/src/lib/tauntProvider_20251002142622.tsx +0 -15
- package/.history/src/lib/tauntProvider_20251002143158.tsx +0 -19
- package/.history/src/lib/tauntProvider_20251002144018.tsx +0 -19
- package/.history/src/lib/tauntProvider_20251002152234.tsx +0 -40
- package/.history/src/lib/tauntProvider_20251002152802.tsx +0 -40
- package/.history/src/lib/tauntProvider_20251002153101.tsx +0 -49
- package/.history/src/lib/taunt_20251002160026.ts +0 -0
- package/.history/src/lib/taunt_20251002160045.ts +0 -2
- package/.history/src/main_20251002141038.tsx +0 -10
- package/.history/src/main_20251002141444.tsx +0 -12
- package/.history/src/main_20251002160347.tsx +0 -12
- package/.history/vite.config_20251002141038.ts +0 -7
- package/.history/vite.config_20251002141323.ts +0 -10
- package/.prettierrc.mjs +0 -22
- package/eslint.config.js +0 -23
- package/index.html +0 -13
- package/public/vite.svg +0 -1
- package/src/App.css +0 -42
- package/src/App.tsx +0 -54
- package/src/index.css +0 -68
- package/src/lib/magic.tsx +0 -50
- package/src/lib/metamask.tsx +0 -27
- package/src/lib/styling.css +0 -25
- package/src/lib/tauntContext.ts +0 -22
- package/src/lib/tauntProvider.tsx +0 -49
- package/src/main.tsx +0 -12
- package/tsconfig.app.json +0 -28
- package/tsconfig.json +0 -7
- package/tsconfig.node.json +0 -26
- package/vite.config.ts +0 -10
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
button.rdz-button {
|
|
2
|
-
border-radius: 8px;
|
|
3
|
-
border: 1px solid transparent;
|
|
4
|
-
padding: 0.6em 1.2em;
|
|
5
|
-
font-size: 1em;
|
|
6
|
-
font-weight: 500;
|
|
7
|
-
font-family: inherit;
|
|
8
|
-
background-color: #1a1a1a;
|
|
9
|
-
cursor: pointer;
|
|
10
|
-
transition: border-color 0.25s;
|
|
11
|
-
color: red;
|
|
12
|
-
|
|
13
|
-
&:hover {
|
|
14
|
-
border-color: #646cff;
|
|
15
|
-
}
|
|
16
|
-
&:focus,
|
|
17
|
-
&:focus-visible {
|
|
18
|
-
outline: 4px auto -webkit-focus-ring-color;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
button.rdz-button {
|
|
2
|
-
border-radius: 8px;
|
|
3
|
-
border: 1px solid transparent;
|
|
4
|
-
padding: 0.6em 1.2em;
|
|
5
|
-
font-size: 1em;
|
|
6
|
-
font-weight: 500;
|
|
7
|
-
font-family: inherit;
|
|
8
|
-
background-color: #1a1a1a;
|
|
9
|
-
cursor: pointer;
|
|
10
|
-
transition: border-color 0.25s;
|
|
11
|
-
|
|
12
|
-
&:hover {
|
|
13
|
-
border-color: #646cff;
|
|
14
|
-
}
|
|
15
|
-
&:focus,
|
|
16
|
-
&:focus-visible {
|
|
17
|
-
outline: 4px auto -webkit-focus-ring-color;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
button.rdz-button {
|
|
2
|
-
color: lightgray;
|
|
3
|
-
border-radius: 8px;
|
|
4
|
-
border: 1px solid transparent;
|
|
5
|
-
padding: 0.6em 1.2em;
|
|
6
|
-
font-size: 1em;
|
|
7
|
-
font-weight: 500;
|
|
8
|
-
font-family: inherit;
|
|
9
|
-
background-color: #1a1a1a;
|
|
10
|
-
cursor: pointer;
|
|
11
|
-
transition: border-color 0.25s;
|
|
12
|
-
|
|
13
|
-
&:hover {
|
|
14
|
-
border-color: #646cff;
|
|
15
|
-
}
|
|
16
|
-
&:focus,
|
|
17
|
-
&:focus-visible {
|
|
18
|
-
outline: 4px auto -webkit-focus-ring-color;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
button.rdz-button {
|
|
2
|
-
font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
|
|
3
|
-
line-height: 1.5;
|
|
4
|
-
font-weight: 400;
|
|
5
|
-
color: lightgray;
|
|
6
|
-
border-radius: 8px;
|
|
7
|
-
border: 1px solid transparent;
|
|
8
|
-
padding: 0.6em 1.2em;
|
|
9
|
-
font-size: 1em;
|
|
10
|
-
font-weight: 500;
|
|
11
|
-
font-family: inherit;
|
|
12
|
-
background-color: #1a1a1a;
|
|
13
|
-
cursor: pointer;
|
|
14
|
-
transition: border-color 0.25s;
|
|
15
|
-
|
|
16
|
-
&:hover {
|
|
17
|
-
border-color: #646cff;
|
|
18
|
-
}
|
|
19
|
-
&:focus,
|
|
20
|
-
&:focus-visible {
|
|
21
|
-
outline: 4px auto -webkit-focus-ring-color;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
button.rdz-button {
|
|
2
|
-
font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
|
|
3
|
-
line-height: 1.5;
|
|
4
|
-
font-weight: 400;
|
|
5
|
-
|
|
6
|
-
color: lightgray;
|
|
7
|
-
border-radius: 8px;
|
|
8
|
-
border: 1px solid transparent;
|
|
9
|
-
padding: 0.6em 1.2em;
|
|
10
|
-
font-size: 1em;
|
|
11
|
-
font-weight: 500;
|
|
12
|
-
font-family: inherit;
|
|
13
|
-
background-color: #1a1a1a;
|
|
14
|
-
cursor: pointer;
|
|
15
|
-
transition: border-color 0.25s;
|
|
16
|
-
|
|
17
|
-
&:hover {
|
|
18
|
-
border-color: #646cff;
|
|
19
|
-
}
|
|
20
|
-
&:focus,
|
|
21
|
-
&:focus-visible {
|
|
22
|
-
outline: 4px auto -webkit-focus-ring-color;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
button.rdz-button {
|
|
2
|
-
font-family: Avenir, Helvetica, Arial, sans-serif;
|
|
3
|
-
line-height: 1.5;
|
|
4
|
-
font-weight: 400;
|
|
5
|
-
|
|
6
|
-
color: lightgray;
|
|
7
|
-
border-radius: 8px;
|
|
8
|
-
border: 1px solid transparent;
|
|
9
|
-
padding: 0.6em 1.2em;
|
|
10
|
-
font-size: 1em;
|
|
11
|
-
font-weight: 500;
|
|
12
|
-
font-family: inherit;
|
|
13
|
-
background-color: #1a1a1a;
|
|
14
|
-
cursor: pointer;
|
|
15
|
-
transition: border-color 0.25s;
|
|
16
|
-
|
|
17
|
-
&:hover {
|
|
18
|
-
border-color: #646cff;
|
|
19
|
-
}
|
|
20
|
-
&:focus,
|
|
21
|
-
&:focus-visible {
|
|
22
|
-
outline: 4px auto -webkit-focus-ring-color;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
button.rdz-button {
|
|
2
|
-
font-family: Roboto;
|
|
3
|
-
line-height: 1.5;
|
|
4
|
-
font-weight: 400;
|
|
5
|
-
|
|
6
|
-
color: lightgray;
|
|
7
|
-
border-radius: 8px;
|
|
8
|
-
border: 1px solid transparent;
|
|
9
|
-
padding: 0.6em 1.2em;
|
|
10
|
-
font-size: 1em;
|
|
11
|
-
font-weight: 500;
|
|
12
|
-
font-family: inherit;
|
|
13
|
-
background-color: #1a1a1a;
|
|
14
|
-
cursor: pointer;
|
|
15
|
-
transition: border-color 0.25s;
|
|
16
|
-
|
|
17
|
-
&:hover {
|
|
18
|
-
border-color: #646cff;
|
|
19
|
-
}
|
|
20
|
-
&:focus,
|
|
21
|
-
&:focus-visible {
|
|
22
|
-
outline: 4px auto -webkit-focus-ring-color;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
button.rdz-button {
|
|
2
|
-
font-family: Arial, Helvetica, sans-serif;
|
|
3
|
-
line-height: 1.5;
|
|
4
|
-
font-weight: 400;
|
|
5
|
-
|
|
6
|
-
color: lightgray;
|
|
7
|
-
border-radius: 8px;
|
|
8
|
-
border: 1px solid transparent;
|
|
9
|
-
padding: 0.6em 1.2em;
|
|
10
|
-
font-size: 1em;
|
|
11
|
-
font-weight: 500;
|
|
12
|
-
font-family: inherit;
|
|
13
|
-
background-color: #1a1a1a;
|
|
14
|
-
cursor: pointer;
|
|
15
|
-
transition: border-color 0.25s;
|
|
16
|
-
|
|
17
|
-
&:hover {
|
|
18
|
-
border-color: #646cff;
|
|
19
|
-
}
|
|
20
|
-
&:focus,
|
|
21
|
-
&:focus-visible {
|
|
22
|
-
outline: 4px auto -webkit-focus-ring-color;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
.rdz-button {
|
|
2
|
-
font-family: Arial, Helvetica, sans-serif;
|
|
3
|
-
line-height: 1.5;
|
|
4
|
-
font-weight: 400;
|
|
5
|
-
|
|
6
|
-
color: lightgray;
|
|
7
|
-
border-radius: 8px;
|
|
8
|
-
border: 1px solid transparent;
|
|
9
|
-
padding: 0.6em 1.2em;
|
|
10
|
-
font-size: 1em;
|
|
11
|
-
font-weight: 500;
|
|
12
|
-
font-family: inherit;
|
|
13
|
-
background-color: #1a1a1a;
|
|
14
|
-
cursor: pointer;
|
|
15
|
-
transition: border-color 0.25s;
|
|
16
|
-
|
|
17
|
-
&:hover {
|
|
18
|
-
border-color: #646cff;
|
|
19
|
-
}
|
|
20
|
-
&:focus,
|
|
21
|
-
&:focus-visible {
|
|
22
|
-
outline: 4px auto -webkit-focus-ring-color;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
.rdz-button {
|
|
2
|
-
font-family: Avenir, Helvetica, Arial, sans-serif;
|
|
3
|
-
line-height: 1.5;
|
|
4
|
-
font-weight: 400;
|
|
5
|
-
|
|
6
|
-
color: lightgray;
|
|
7
|
-
border-radius: 8px;
|
|
8
|
-
border: 1px solid transparent;
|
|
9
|
-
padding: 0.6em 1.2em;
|
|
10
|
-
font-size: 1em;
|
|
11
|
-
font-weight: 500;
|
|
12
|
-
font-family: inherit;
|
|
13
|
-
background-color: #1a1a1a;
|
|
14
|
-
cursor: pointer;
|
|
15
|
-
transition: border-color 0.25s;
|
|
16
|
-
|
|
17
|
-
&:hover {
|
|
18
|
-
border-color: #646cff;
|
|
19
|
-
}
|
|
20
|
-
&:focus,
|
|
21
|
-
&:focus-visible {
|
|
22
|
-
outline: 4px auto -webkit-focus-ring-color;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
.rdz-button {
|
|
2
|
-
font-family: Avenir, Helvetica, Arial, sans-serif;
|
|
3
|
-
line-height: 1.5;
|
|
4
|
-
font-weight: 400 !important;
|
|
5
|
-
|
|
6
|
-
color: lightgray;
|
|
7
|
-
border-radius: 8px;
|
|
8
|
-
border: 1px solid transparent;
|
|
9
|
-
padding: 0.6em 1.2em;
|
|
10
|
-
font-size: 1em;
|
|
11
|
-
font-weight: 500;
|
|
12
|
-
font-family: inherit;
|
|
13
|
-
background-color: #1a1a1a;
|
|
14
|
-
cursor: pointer;
|
|
15
|
-
transition: border-color 0.25s;
|
|
16
|
-
|
|
17
|
-
&:hover {
|
|
18
|
-
border-color: #646cff;
|
|
19
|
-
}
|
|
20
|
-
&:focus,
|
|
21
|
-
&:focus-visible {
|
|
22
|
-
outline: 4px auto -webkit-focus-ring-color;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
.rdz-button {
|
|
2
|
-
font-family: Avenir, Helvetica, Arial, sans-serif !important;
|
|
3
|
-
line-height: 1.5;
|
|
4
|
-
font-weight: 400 !important;
|
|
5
|
-
|
|
6
|
-
color: lightgray;
|
|
7
|
-
border-radius: 8px;
|
|
8
|
-
border: 1px solid transparent;
|
|
9
|
-
padding: 0.6em 1.2em;
|
|
10
|
-
font-size: 1em;
|
|
11
|
-
font-weight: 500;
|
|
12
|
-
font-family: inherit;
|
|
13
|
-
background-color: #1a1a1a;
|
|
14
|
-
cursor: pointer;
|
|
15
|
-
transition: border-color 0.25s;
|
|
16
|
-
|
|
17
|
-
&:hover {
|
|
18
|
-
border-color: #646cff;
|
|
19
|
-
}
|
|
20
|
-
&:focus,
|
|
21
|
-
&:focus-visible {
|
|
22
|
-
outline: 4px auto -webkit-focus-ring-color;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
.rdz-button,
|
|
2
|
-
.rdz-input {
|
|
3
|
-
font-family: Avenir, Helvetica, Arial, sans-serif !important;
|
|
4
|
-
line-height: 1.5;
|
|
5
|
-
font-weight: 400 !important;
|
|
6
|
-
|
|
7
|
-
color: lightgray;
|
|
8
|
-
border-radius: 8px;
|
|
9
|
-
border: 1px solid transparent;
|
|
10
|
-
padding: 0.6em 1.2em;
|
|
11
|
-
font-size: 1em;
|
|
12
|
-
font-weight: 500;
|
|
13
|
-
font-family: inherit;
|
|
14
|
-
background-color: #1a1a1a;
|
|
15
|
-
cursor: pointer;
|
|
16
|
-
transition: border-color 0.25s;
|
|
17
|
-
|
|
18
|
-
&:hover {
|
|
19
|
-
border-color: #646cff;
|
|
20
|
-
}
|
|
21
|
-
&:focus,
|
|
22
|
-
&:focus-visible {
|
|
23
|
-
outline: 4px auto -webkit-focus-ring-color;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
File without changes
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { createContext, useContext } from "react"
|
|
2
|
-
|
|
3
|
-
type ContextProps = {
|
|
4
|
-
tauntServiceEndpoint: string
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
export const TauntContext = createContext<ContextProps>({
|
|
8
|
-
tauntServiceEndpoint: ""
|
|
9
|
-
})
|
|
10
|
-
|
|
11
|
-
export function useTaunt() {
|
|
12
|
-
const ctx = useContext(TauntContext)
|
|
13
|
-
if (!ctx) {
|
|
14
|
-
throw new Error("useTaunt must be used within a TauntProvider")
|
|
15
|
-
}
|
|
16
|
-
return ctx
|
|
17
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { createContext, useContext } from "react"
|
|
2
|
-
|
|
3
|
-
type ContextProps = {
|
|
4
|
-
tauntServiceEndpoint: string
|
|
5
|
-
deets?: { accessToken: string; refreshToken: string }
|
|
6
|
-
metamaskLogin: () => void
|
|
7
|
-
otpLogin: (email: string) => void
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export const TauntContext = createContext<ContextProps>({
|
|
11
|
-
tauntServiceEndpoint: "",
|
|
12
|
-
metamaskLogin: () => {},
|
|
13
|
-
otpLogin: () => {}
|
|
14
|
-
})
|
|
15
|
-
|
|
16
|
-
export function useTaunt() {
|
|
17
|
-
const ctx = useContext(TauntContext)
|
|
18
|
-
if (!ctx) {
|
|
19
|
-
throw new Error("useTaunt must be used within a TauntProvider")
|
|
20
|
-
}
|
|
21
|
-
return ctx
|
|
22
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { createContext, useContext } from "react"
|
|
2
|
-
|
|
3
|
-
type ContextProps = {
|
|
4
|
-
tauntServiceEndpoint: string
|
|
5
|
-
deets?: { accessToken: string; refreshToken: string }
|
|
6
|
-
metamaskLogin: () => void
|
|
7
|
-
otpMagicLogin: (email: string) => void
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export const TauntContext = createContext<ContextProps>({
|
|
11
|
-
tauntServiceEndpoint: "",
|
|
12
|
-
metamaskLogin: () => {},
|
|
13
|
-
otpMagicLogin: () => {}
|
|
14
|
-
})
|
|
15
|
-
|
|
16
|
-
export function useTaunt() {
|
|
17
|
-
const ctx = useContext(TauntContext)
|
|
18
|
-
if (!ctx) {
|
|
19
|
-
throw new Error("useTaunt must be used within a TauntProvider")
|
|
20
|
-
}
|
|
21
|
-
return ctx
|
|
22
|
-
}
|
|
File without changes
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { TauntContext } from "./tauntContext"
|
|
2
|
-
|
|
3
|
-
export const TauntProvider = ({
|
|
4
|
-
children,
|
|
5
|
-
tauntServiceEndpoint
|
|
6
|
-
}: {
|
|
7
|
-
children: React.ReactNode
|
|
8
|
-
tauntServiceEndpoint: string
|
|
9
|
-
}) => {
|
|
10
|
-
return (
|
|
11
|
-
<TauntContext.Provider value={{ tauntServiceEndpoint }}>
|
|
12
|
-
{children}
|
|
13
|
-
</TauntContext.Provider>
|
|
14
|
-
)
|
|
15
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { TauntContext } from "./tauntContext"
|
|
2
|
-
|
|
3
|
-
export const TauntProvider = ({
|
|
4
|
-
children,
|
|
5
|
-
tauntServiceEndpoint
|
|
6
|
-
}: {
|
|
7
|
-
children: React.ReactNode
|
|
8
|
-
tauntServiceEndpoint?: string
|
|
9
|
-
}) => {
|
|
10
|
-
if (!tauntServiceEndpoint) {
|
|
11
|
-
throw new Error("tauntServiceEndpoint is required")
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
return (
|
|
15
|
-
<TauntContext.Provider value={{ tauntServiceEndpoint }}>
|
|
16
|
-
{children}
|
|
17
|
-
</TauntContext.Provider>
|
|
18
|
-
)
|
|
19
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { TauntContext } from "./tauntContext"
|
|
2
|
-
|
|
3
|
-
export const TauntProvider = ({
|
|
4
|
-
children,
|
|
5
|
-
tauntServiceEndpoint
|
|
6
|
-
}: {
|
|
7
|
-
children: React.ReactNode
|
|
8
|
-
tauntServiceEndpoint?: string
|
|
9
|
-
}) => {
|
|
10
|
-
if (!tauntServiceEndpoint) {
|
|
11
|
-
return <div>tauntServiceEndpoint is required</div>
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
return (
|
|
15
|
-
<TauntContext.Provider value={{ tauntServiceEndpoint }}>
|
|
16
|
-
{children}
|
|
17
|
-
</TauntContext.Provider>
|
|
18
|
-
)
|
|
19
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { tauntMagicDidLogin, tauntMetamaskLogin } from "@redzone/taunt-logins"
|
|
2
|
-
import { useCallback, useState } from "react"
|
|
3
|
-
|
|
4
|
-
import { TauntContext } from "./tauntContext"
|
|
5
|
-
|
|
6
|
-
export const TauntProvider = ({
|
|
7
|
-
children,
|
|
8
|
-
tauntServiceEndpoint
|
|
9
|
-
}: {
|
|
10
|
-
children: React.ReactNode
|
|
11
|
-
tauntServiceEndpoint?: string
|
|
12
|
-
}) => {
|
|
13
|
-
const [deets, setDeets] = useState<{
|
|
14
|
-
accessToken: string
|
|
15
|
-
refreshToken: string
|
|
16
|
-
}>()
|
|
17
|
-
|
|
18
|
-
const otpLogin = useCallback(
|
|
19
|
-
(email: string) => {
|
|
20
|
-
tauntMagicDidLogin(tauntServiceEndpoint!, email!).then(setDeets)
|
|
21
|
-
},
|
|
22
|
-
[tauntServiceEndpoint]
|
|
23
|
-
)
|
|
24
|
-
|
|
25
|
-
const metamaskLogin = useCallback(
|
|
26
|
-
() => tauntMetamaskLogin(tauntServiceEndpoint!).then(setDeets),
|
|
27
|
-
[tauntServiceEndpoint]
|
|
28
|
-
)
|
|
29
|
-
|
|
30
|
-
if (!tauntServiceEndpoint) {
|
|
31
|
-
return <div>tauntServiceEndpoint is required</div>
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
return (
|
|
35
|
-
<TauntContext.Provider
|
|
36
|
-
value={{ tauntServiceEndpoint, deets, otpLogin, metamaskLogin }}>
|
|
37
|
-
{children}
|
|
38
|
-
</TauntContext.Provider>
|
|
39
|
-
)
|
|
40
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { tauntMagicDidLogin, tauntMetamaskLogin } from "@redzone/taunt-logins"
|
|
2
|
-
import { useCallback, useState } from "react"
|
|
3
|
-
|
|
4
|
-
import { TauntContext } from "./tauntContext"
|
|
5
|
-
|
|
6
|
-
export const TauntProvider = ({
|
|
7
|
-
children,
|
|
8
|
-
tauntServiceEndpoint
|
|
9
|
-
}: {
|
|
10
|
-
children: React.ReactNode
|
|
11
|
-
tauntServiceEndpoint?: string
|
|
12
|
-
}) => {
|
|
13
|
-
const [deets, setDeets] = useState<{
|
|
14
|
-
accessToken: string
|
|
15
|
-
refreshToken: string
|
|
16
|
-
}>()
|
|
17
|
-
|
|
18
|
-
const otpMagicLogin = useCallback(
|
|
19
|
-
(email: string) => {
|
|
20
|
-
tauntMagicDidLogin(tauntServiceEndpoint!, email!).then(setDeets)
|
|
21
|
-
},
|
|
22
|
-
[tauntServiceEndpoint]
|
|
23
|
-
)
|
|
24
|
-
|
|
25
|
-
const metamaskLogin = useCallback(
|
|
26
|
-
() => tauntMetamaskLogin(tauntServiceEndpoint!).then(setDeets),
|
|
27
|
-
[tauntServiceEndpoint]
|
|
28
|
-
)
|
|
29
|
-
|
|
30
|
-
if (!tauntServiceEndpoint) {
|
|
31
|
-
return <div>tauntServiceEndpoint is required</div>
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
return (
|
|
35
|
-
<TauntContext.Provider
|
|
36
|
-
value={{ tauntServiceEndpoint, deets, otpMagicLogin, metamaskLogin }}>
|
|
37
|
-
{children}
|
|
38
|
-
</TauntContext.Provider>
|
|
39
|
-
)
|
|
40
|
-
}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
tauntMagicEmailOTPLogin,
|
|
3
|
-
tauntMetamaskLogin
|
|
4
|
-
} from "@redzone/taunt-logins"
|
|
5
|
-
import { useCallback, useState } from "react"
|
|
6
|
-
|
|
7
|
-
import { TauntContext } from "./tauntContext"
|
|
8
|
-
|
|
9
|
-
export const TauntProvider = ({
|
|
10
|
-
children,
|
|
11
|
-
tauntServiceEndpoint,
|
|
12
|
-
magicKey
|
|
13
|
-
}: {
|
|
14
|
-
children: React.ReactNode
|
|
15
|
-
tauntServiceEndpoint?: string
|
|
16
|
-
magicKey?: string
|
|
17
|
-
}) => {
|
|
18
|
-
const [deets, setDeets] = useState<{
|
|
19
|
-
accessToken: string
|
|
20
|
-
refreshToken: string
|
|
21
|
-
}>()
|
|
22
|
-
|
|
23
|
-
const otpMagicLogin = useCallback(
|
|
24
|
-
(email: string) => {
|
|
25
|
-
if (!magicKey) throw new Error("magicKey is required for OTP login")
|
|
26
|
-
|
|
27
|
-
tauntMagicEmailOTPLogin(tauntServiceEndpoint!, magicKey, email!).then(
|
|
28
|
-
setDeets
|
|
29
|
-
)
|
|
30
|
-
},
|
|
31
|
-
[tauntServiceEndpoint]
|
|
32
|
-
)
|
|
33
|
-
|
|
34
|
-
const metamaskLogin = useCallback(
|
|
35
|
-
() => tauntMetamaskLogin(tauntServiceEndpoint!).then(setDeets),
|
|
36
|
-
[tauntServiceEndpoint]
|
|
37
|
-
)
|
|
38
|
-
|
|
39
|
-
if (!tauntServiceEndpoint) {
|
|
40
|
-
return <div>tauntServiceEndpoint is required</div>
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
return (
|
|
44
|
-
<TauntContext.Provider
|
|
45
|
-
value={{ tauntServiceEndpoint, deets, otpMagicLogin, metamaskLogin }}>
|
|
46
|
-
{children}
|
|
47
|
-
</TauntContext.Provider>
|
|
48
|
-
)
|
|
49
|
-
}
|
|
File without changes
|
package/.prettierrc.mjs
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @type {import('prettier').Options}
|
|
3
|
-
*/
|
|
4
|
-
export default {
|
|
5
|
-
printWidth: 80,
|
|
6
|
-
tabWidth: 2,
|
|
7
|
-
useTabs: false,
|
|
8
|
-
semi: false,
|
|
9
|
-
singleQuote: false,
|
|
10
|
-
trailingComma: "none",
|
|
11
|
-
bracketSpacing: true,
|
|
12
|
-
bracketSameLine: true,
|
|
13
|
-
plugins: ["@ianvs/prettier-plugin-sort-imports"],
|
|
14
|
-
importOrder: [
|
|
15
|
-
"<BUILTIN_MODULES>", // Node.js built-in modules
|
|
16
|
-
"<THIRD_PARTY_MODULES>", // Imports not matched by other special words or groups.
|
|
17
|
-
"",
|
|
18
|
-
"^~(.*)$",
|
|
19
|
-
"",
|
|
20
|
-
"^[./]"
|
|
21
|
-
]
|
|
22
|
-
}
|