@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.
Files changed (123) hide show
  1. package/dist/App.d.ts +2 -0
  2. package/dist/lib/index.d.ts +4 -0
  3. package/dist/lib/magic.d.ts +3 -0
  4. package/dist/lib/metamask.d.ts +3 -0
  5. package/dist/lib/tauntContext.d.ts +12 -0
  6. package/dist/lib/tauntProvider.d.ts +5 -0
  7. package/dist/main.d.ts +1 -0
  8. package/dist/taunt-logins-ui-react.d.ts +2 -0
  9. package/dist/taunt-logins-ui-react.js +3089 -0
  10. package/dist/taunt-logins-ui-react.js.map +1 -0
  11. package/dist/taunt-logins-ui-react.umd.cjs +7 -0
  12. package/dist/taunt-logins-ui-react.umd.cjs.map +1 -0
  13. package/package.json +25 -16
  14. package/.history/index_20251002141038.html +0 -13
  15. package/.history/index_20251002141344.html +0 -13
  16. package/.history/package_20251002154235.json +0 -32
  17. package/.history/package_20251002160110.json +0 -33
  18. package/.history/package_20251002161109.json +0 -33
  19. package/.history/package_20251002161124.json +0 -32
  20. package/.history/package_20251002161826.json +0 -32
  21. package/.history/package_20251002162139.json +0 -32
  22. package/.history/package_20251002162605.json +0 -35
  23. package/.history/package_20251002162619.json +0 -35
  24. package/.history/package_20251002162631.json +0 -35
  25. package/.history/package_20251002162639.json +0 -35
  26. package/.history/package_20251002162659.json +0 -35
  27. package/.history/package_20251002162811.json +0 -39
  28. package/.history/package_20251002162820.json +0 -39
  29. package/.history/src/App_20251002141038.tsx +0 -35
  30. package/.history/src/App_20251002142848.tsx +0 -15
  31. package/.history/src/App_20251002152540.tsx +0 -15
  32. package/.history/src/App_20251002152831.tsx +0 -17
  33. package/.history/src/App_20251002153145.tsx +0 -18
  34. package/.history/src/App_20251002153323.tsx +0 -25
  35. package/.history/src/App_20251002153420.tsx +0 -32
  36. package/.history/src/App_20251002153429.tsx +0 -33
  37. package/.history/src/App_20251002153457.tsx +0 -39
  38. package/.history/src/App_20251002153516.tsx +0 -39
  39. package/.history/src/App_20251002153520.tsx +0 -39
  40. package/.history/src/App_20251002153546.tsx +0 -41
  41. package/.history/src/App_20251002154625.tsx +0 -41
  42. package/.history/src/App_20251002154740.tsx +0 -47
  43. package/.history/src/App_20251002154812.tsx +0 -47
  44. package/.history/src/App_20251002154841.tsx +0 -47
  45. package/.history/src/App_20251002154915.tsx +0 -54
  46. package/.history/src/App_20251002160347.tsx +0 -54
  47. package/.history/src/lib/exports_20251002160004.ts +0 -0
  48. package/.history/src/lib/exports_20251002160045.ts +0 -3
  49. package/.history/src/lib/index_20251002162704.ts +0 -0
  50. package/.history/src/lib/index_20251002162712.ts +0 -1
  51. package/.history/src/lib/magic_20251002142829.tsx +0 -0
  52. package/.history/src/lib/magic_20251002142848.tsx +0 -44
  53. package/.history/src/lib/magic_20251002152540.tsx +0 -28
  54. package/.history/src/lib/magic_20251002152543.tsx +0 -28
  55. package/.history/src/lib/magic_20251002152546.tsx +0 -28
  56. package/.history/src/lib/magic_20251002152802.tsx +0 -47
  57. package/.history/src/lib/magic_20251002154740.tsx +0 -47
  58. package/.history/src/lib/magic_20251002155035.tsx +0 -47
  59. package/.history/src/lib/magic_20251002160411.tsx +0 -49
  60. package/.history/src/lib/magic_20251002160428.tsx +0 -49
  61. package/.history/src/lib/magic_20251002161028.tsx +0 -50
  62. package/.history/src/lib/magic_20251002162134.tsx +0 -50
  63. package/.history/src/lib/metamask_20251002141612.tsx +0 -0
  64. package/.history/src/lib/metamask_20251002142622.tsx +0 -38
  65. package/.history/src/lib/metamask_20251002142654.tsx +0 -41
  66. package/.history/src/lib/metamask_20251002142726.tsx +0 -44
  67. package/.history/src/lib/metamask_20251002142848.tsx +0 -0
  68. package/.history/src/lib/metamask_20251002152802.tsx +0 -28
  69. package/.history/src/lib/metamask_20251002153516.tsx +0 -27
  70. package/.history/src/lib/metamask_20251002154228.tsx +0 -27
  71. package/.history/src/lib/metamask_20251002154523.tsx +0 -27
  72. package/.history/src/lib/metamask_20251002162122.tsx +0 -27
  73. package/.history/src/lib/styling_20251002154448.css +0 -0
  74. package/.history/src/lib/styling_20251002154523.css +0 -19
  75. package/.history/src/lib/styling_20251002154531.css +0 -19
  76. package/.history/src/lib/styling_20251002154544.css +0 -20
  77. package/.history/src/lib/styling_20251002154548.css +0 -19
  78. package/.history/src/lib/styling_20251002160446.css +0 -20
  79. package/.history/src/lib/styling_20251002160511.css +0 -23
  80. package/.history/src/lib/styling_20251002160515.css +0 -24
  81. package/.history/src/lib/styling_20251002160815.css +0 -24
  82. package/.history/src/lib/styling_20251002160910.css +0 -24
  83. package/.history/src/lib/styling_20251002160915.css +0 -24
  84. package/.history/src/lib/styling_20251002160952.css +0 -24
  85. package/.history/src/lib/styling_20251002161001.css +0 -24
  86. package/.history/src/lib/styling_20251002161011.css +0 -24
  87. package/.history/src/lib/styling_20251002161016.css +0 -24
  88. package/.history/src/lib/styling_20251002161036.css +0 -25
  89. package/.history/src/lib/tauntContext_20251002142359.ts +0 -0
  90. package/.history/src/lib/tauntContext_20251002142622.ts +0 -17
  91. package/.history/src/lib/tauntContext_20251002152540.ts +0 -22
  92. package/.history/src/lib/tauntContext_20251002152802.ts +0 -22
  93. package/.history/src/lib/tauntProvider_20251002142503.tsx +0 -0
  94. package/.history/src/lib/tauntProvider_20251002142622.tsx +0 -15
  95. package/.history/src/lib/tauntProvider_20251002143158.tsx +0 -19
  96. package/.history/src/lib/tauntProvider_20251002144018.tsx +0 -19
  97. package/.history/src/lib/tauntProvider_20251002152234.tsx +0 -40
  98. package/.history/src/lib/tauntProvider_20251002152802.tsx +0 -40
  99. package/.history/src/lib/tauntProvider_20251002153101.tsx +0 -49
  100. package/.history/src/lib/taunt_20251002160026.ts +0 -0
  101. package/.history/src/lib/taunt_20251002160045.ts +0 -2
  102. package/.history/src/main_20251002141038.tsx +0 -10
  103. package/.history/src/main_20251002141444.tsx +0 -12
  104. package/.history/src/main_20251002160347.tsx +0 -12
  105. package/.history/vite.config_20251002141038.ts +0 -7
  106. package/.history/vite.config_20251002141323.ts +0 -10
  107. package/.prettierrc.mjs +0 -22
  108. package/eslint.config.js +0 -23
  109. package/index.html +0 -13
  110. package/public/vite.svg +0 -1
  111. package/src/App.css +0 -42
  112. package/src/App.tsx +0 -54
  113. package/src/index.css +0 -68
  114. package/src/lib/magic.tsx +0 -50
  115. package/src/lib/metamask.tsx +0 -27
  116. package/src/lib/styling.css +0 -25
  117. package/src/lib/tauntContext.ts +0 -22
  118. package/src/lib/tauntProvider.tsx +0 -49
  119. package/src/main.tsx +0 -12
  120. package/tsconfig.app.json +0 -28
  121. package/tsconfig.json +0 -7
  122. package/tsconfig.node.json +0 -26
  123. package/vite.config.ts +0 -10
@@ -1,25 +0,0 @@
1
- import "./App.css"
2
-
3
- import { MagicEmailInput } from "./lib/magic"
4
- import { MetaMaskButton } from "./lib/metamask"
5
- import { useTaunt } from "./lib/tauntContext"
6
- import { TauntProvider } from "./lib/tauntProvider"
7
-
8
- function App() {
9
- return (
10
- <TauntProvider
11
- tauntServiceEndpoint={import.meta.env.VITE_TAUNT_SERVICE_ENDPOINT}
12
- magicKey={import.meta.env.VITE_MAGIC_KEY}>
13
- <MagicEmailInput />
14
- <MetaMaskButton />
15
- <TauntDeets />
16
- </TauntProvider>
17
- )
18
- }
19
-
20
- function TauntDeets() {
21
- const { deets } = useTaunt()
22
- return <pre>{JSON.stringify(deets, null, 2)}</pre>
23
- }
24
-
25
- export default App
@@ -1,32 +0,0 @@
1
- import "./App.css"
2
-
3
- import { MagicEmailInput } from "./lib/magic"
4
- import { MetaMaskButton } from "./lib/metamask"
5
- import { useTaunt } from "./lib/tauntContext"
6
- import { TauntProvider } from "./lib/tauntProvider"
7
-
8
- function App() {
9
- return (
10
- <TauntProvider
11
- tauntServiceEndpoint={import.meta.env.VITE_TAUNT_SERVICE_ENDPOINT}
12
- magicKey={import.meta.env.VITE_MAGIC_KEY}>
13
- <MagicEmailInput />
14
- <MetaMaskButton />
15
- <TauntDeets />
16
- </TauntProvider>
17
- )
18
- }
19
-
20
- function LogoutButton() {
21
- const { deets } = useTaunt()
22
- if (!deets) return null
23
-
24
- return <input type="button" value="Logout" />
25
- }
26
-
27
- function TauntDeets() {
28
- const { deets } = useTaunt()
29
- return <pre>{JSON.stringify(deets, null, 2)}</pre>
30
- }
31
-
32
- export default App
@@ -1,33 +0,0 @@
1
- import "./App.css"
2
-
3
- import { MagicEmailInput } from "./lib/magic"
4
- import { MetaMaskButton } from "./lib/metamask"
5
- import { useTaunt } from "./lib/tauntContext"
6
- import { TauntProvider } from "./lib/tauntProvider"
7
-
8
- function App() {
9
- return (
10
- <TauntProvider
11
- tauntServiceEndpoint={import.meta.env.VITE_TAUNT_SERVICE_ENDPOINT}
12
- magicKey={import.meta.env.VITE_MAGIC_KEY}>
13
- <MagicEmailInput />
14
- <MetaMaskButton />
15
- <TauntDeets />
16
- <LogoutButton />
17
- </TauntProvider>
18
- )
19
- }
20
-
21
- function LogoutButton() {
22
- const { deets } = useTaunt()
23
- if (!deets) return null
24
-
25
- return <input type="button" value="Logout" />
26
- }
27
-
28
- function TauntDeets() {
29
- const { deets } = useTaunt()
30
- return <pre>{JSON.stringify(deets, null, 2)}</pre>
31
- }
32
-
33
- export default App
@@ -1,39 +0,0 @@
1
- import "./App.css"
2
-
3
- import { MagicEmailInput } from "./lib/magic"
4
- import { MetaMaskButton } from "./lib/metamask"
5
- import { useTaunt } from "./lib/tauntContext"
6
- import { TauntProvider } from "./lib/tauntProvider"
7
-
8
- function App() {
9
- return (
10
- <TauntProvider
11
- tauntServiceEndpoint={import.meta.env.VITE_TAUNT_SERVICE_ENDPOINT}
12
- magicKey={import.meta.env.VITE_MAGIC_KEY}>
13
- <MagicEmailInput />
14
- <MetaMaskButton />
15
- <TauntDeets />
16
- <LogoutButton />
17
- </TauntProvider>
18
- )
19
- }
20
-
21
- function LogoutButton() {
22
- const { deets } = useTaunt()
23
- if (!deets) return null
24
-
25
- return (
26
- <input
27
- className="ml-2 p-2 bg-blue-500 text-white rounded-md"
28
- type="button"
29
- value="Logout"
30
- />
31
- )
32
- }
33
-
34
- function TauntDeets() {
35
- const { deets } = useTaunt()
36
- return <pre>{JSON.stringify(deets, null, 2)}</pre>
37
- }
38
-
39
- export default App
@@ -1,39 +0,0 @@
1
- import "./App.css"
2
-
3
- import { MagicEmailInput } from "./lib/magic"
4
- import { MetaMaskButton } from "./lib/metamask"
5
- import { useTaunt } from "./lib/tauntContext"
6
- import { TauntProvider } from "./lib/tauntProvider"
7
-
8
- function App() {
9
- return (
10
- <TauntProvider
11
- tauntServiceEndpoint={import.meta.env.VITE_TAUNT_SERVICE_ENDPOINT}
12
- magicKey={import.meta.env.VITE_MAGIC_KEY}>
13
- <MagicEmailInput />
14
- <MetaMaskButton />
15
- <TauntDeets />
16
- <LogoutButton />
17
- </TauntProvider>
18
- )
19
- }
20
-
21
- function LogoutButton() {
22
- const { deets } = useTaunt()
23
- if (!deets) return null
24
-
25
- return (
26
- <button
27
- className="ml-2 p-2 bg-blue-500 text-white rounded-md"
28
- type="button">
29
- Logout
30
- </button>
31
- )
32
- }
33
-
34
- function TauntDeets() {
35
- const { deets } = useTaunt()
36
- return <pre>{JSON.stringify(deets, null, 2)}</pre>
37
- }
38
-
39
- export default App
@@ -1,39 +0,0 @@
1
- import "./App.css"
2
-
3
- import { MagicEmailInput } from "./lib/magic"
4
- import { MetaMaskButton } from "./lib/metamask"
5
- import { useTaunt } from "./lib/tauntContext"
6
- import { TauntProvider } from "./lib/tauntProvider"
7
-
8
- function App() {
9
- return (
10
- <TauntProvider
11
- tauntServiceEndpoint={import.meta.env.VITE_TAUNT_SERVICE_ENDPOINT}
12
- magicKey={import.meta.env.VITE_MAGIC_KEY}>
13
- <MagicEmailInput />
14
- <MetaMaskButton />
15
- <LogoutButton />
16
- <TauntDeets />
17
- </TauntProvider>
18
- )
19
- }
20
-
21
- function LogoutButton() {
22
- const { deets } = useTaunt()
23
- if (!deets) return null
24
-
25
- return (
26
- <button
27
- className="ml-2 p-2 bg-blue-500 text-white rounded-md"
28
- type="button">
29
- Logout
30
- </button>
31
- )
32
- }
33
-
34
- function TauntDeets() {
35
- const { deets } = useTaunt()
36
- return <pre>{JSON.stringify(deets, null, 2)}</pre>
37
- }
38
-
39
- export default App
@@ -1,41 +0,0 @@
1
- import "./App.css"
2
-
3
- import { MagicEmailInput } from "./lib/magic"
4
- import { MetaMaskButton } from "./lib/metamask"
5
- import { useTaunt } from "./lib/tauntContext"
6
- import { TauntProvider } from "./lib/tauntProvider"
7
-
8
- function App() {
9
- return (
10
- <TauntProvider
11
- tauntServiceEndpoint={import.meta.env.VITE_TAUNT_SERVICE_ENDPOINT}
12
- magicKey={import.meta.env.VITE_MAGIC_KEY}>
13
- <div className="flex flex-col items-center justify-center min-h-screen bg-gray-100">
14
- <MagicEmailInput />
15
- <MetaMaskButton />
16
- <LogoutButton />
17
- <TauntDeets />
18
- </div>
19
- </TauntProvider>
20
- )
21
- }
22
-
23
- function LogoutButton() {
24
- const { deets } = useTaunt()
25
- if (!deets) return null
26
-
27
- return (
28
- <button
29
- className="ml-2 p-2 bg-blue-500 text-white rounded-md"
30
- type="button">
31
- Logout
32
- </button>
33
- )
34
- }
35
-
36
- function TauntDeets() {
37
- const { deets } = useTaunt()
38
- return <pre>{JSON.stringify(deets, null, 2)}</pre>
39
- }
40
-
41
- export default App
@@ -1,41 +0,0 @@
1
- import "./App.css"
2
-
3
- import { MagicEmailInput } from "./lib/magic"
4
- import { MetaMaskButton } from "./lib/metamask"
5
- import { useTaunt } from "./lib/tauntContext"
6
- import { TauntProvider } from "./lib/tauntProvider"
7
-
8
- function App() {
9
- return (
10
- <TauntProvider
11
- tauntServiceEndpoint={import.meta.env.VITE_TAUNT_SERVICE_ENDPOINT}
12
- magicKey={import.meta.env.VITE_MAGIC_KEY}>
13
- <div style={{ display: "flex", flexDirection: "column", gap: 8 }}>
14
- <MagicEmailInput />
15
- <MetaMaskButton />
16
- <LogoutButton />
17
- <TauntDeets />
18
- </div>
19
- </TauntProvider>
20
- )
21
- }
22
-
23
- function LogoutButton() {
24
- const { deets } = useTaunt()
25
- if (!deets) return null
26
-
27
- return (
28
- <button
29
- className="ml-2 p-2 bg-blue-500 text-white rounded-md"
30
- type="button">
31
- Logout
32
- </button>
33
- )
34
- }
35
-
36
- function TauntDeets() {
37
- const { deets } = useTaunt()
38
- return <pre>{JSON.stringify(deets, null, 2)}</pre>
39
- }
40
-
41
- export default App
@@ -1,47 +0,0 @@
1
- import "./App.css"
2
-
3
- import { MagicEmailInput } from "./lib/magic"
4
- import { MetaMaskButton } from "./lib/metamask"
5
- import { useTaunt } from "./lib/tauntContext"
6
- import { TauntProvider } from "./lib/tauntProvider"
7
-
8
- function App() {
9
- return (
10
- <TauntProvider
11
- tauntServiceEndpoint={import.meta.env.VITE_TAUNT_SERVICE_ENDPOINT}
12
- magicKey={import.meta.env.VITE_MAGIC_KEY}>
13
- <div
14
- style={{
15
- display: "flex",
16
- flexDirection: "column",
17
- gap: 8,
18
- alignItems: "center"
19
- }}>
20
- <MagicEmailInput />
21
- <MetaMaskButton />
22
- <LogoutButton />
23
- <TauntDeets />
24
- </div>
25
- </TauntProvider>
26
- )
27
- }
28
-
29
- function LogoutButton() {
30
- const { deets } = useTaunt()
31
- if (!deets) return null
32
-
33
- return (
34
- <button
35
- className="ml-2 p-2 bg-blue-500 text-white rounded-md"
36
- type="button">
37
- Logout
38
- </button>
39
- )
40
- }
41
-
42
- function TauntDeets() {
43
- const { deets } = useTaunt()
44
- return <pre>{JSON.stringify(deets, null, 2)}</pre>
45
- }
46
-
47
- export default App
@@ -1,47 +0,0 @@
1
- import "./App.css"
2
-
3
- import { MagicEmailInput } from "./lib/magic"
4
- import { MetaMaskButton } from "./lib/metamask"
5
- import { useTaunt } from "./lib/tauntContext"
6
- import { TauntProvider } from "./lib/tauntProvider"
7
-
8
- function App() {
9
- return (
10
- <TauntProvider
11
- tauntServiceEndpoint={import.meta.env.VITE_TAUNT_SERVICE_ENDPOINT}
12
- magicKey={import.meta.env.VITE_MAGIC_KEY}>
13
- <div
14
- style={{
15
- display: "flex",
16
- flexDirection: "column",
17
- gap: 8,
18
- alignItems: "center"
19
- }}>
20
- <MagicEmailInput />
21
- <MetaMaskButton />
22
- <LogoutButton />
23
- <TauntDeets />
24
- </div>
25
- </TauntProvider>
26
- )
27
- }
28
-
29
- function LogoutButton() {
30
- const { deets } = useTaunt()
31
- if (!deets) return null
32
-
33
- return (
34
- <button
35
- className="ml-2 p-2 bg-blue-500 text-white rounded-md"
36
- type="button">
37
- Logout
38
- </button>
39
- )
40
- }
41
-
42
- function TauntDeets() {
43
- const { deets } = useTaunt()
44
- return <input type="text" value={JSON.stringify(deets, null, 2)} readOnly />
45
- }
46
-
47
- export default App
@@ -1,47 +0,0 @@
1
- import "./App.css"
2
-
3
- import { MagicEmailInput } from "./lib/magic"
4
- import { MetaMaskButton } from "./lib/metamask"
5
- import { useTaunt } from "./lib/tauntContext"
6
- import { TauntProvider } from "./lib/tauntProvider"
7
-
8
- function App() {
9
- return (
10
- <TauntProvider
11
- tauntServiceEndpoint={import.meta.env.VITE_TAUNT_SERVICE_ENDPOINT}
12
- magicKey={import.meta.env.VITE_MAGIC_KEY}>
13
- <div
14
- style={{
15
- display: "flex",
16
- flexDirection: "column",
17
- gap: 8,
18
- alignItems: "center"
19
- }}>
20
- <MagicEmailInput />
21
- <MetaMaskButton />
22
- <LogoutButton />
23
- <TauntDeets />
24
- </div>
25
- </TauntProvider>
26
- )
27
- }
28
-
29
- function LogoutButton() {
30
- const { deets } = useTaunt()
31
- if (!deets) return null
32
-
33
- return (
34
- <button
35
- className="ml-2 p-2 bg-blue-500 text-white rounded-md"
36
- type="button">
37
- Logout
38
- </button>
39
- )
40
- }
41
-
42
- function TauntDeets() {
43
- const { deets } = useTaunt()
44
- return <textarea value={JSON.stringify(deets, null, 2)} readOnly />
45
- }
46
-
47
- export default App
@@ -1,54 +0,0 @@
1
- import "./App.css"
2
-
3
- import { MagicEmailInput } from "./lib/magic"
4
- import { MetaMaskButton } from "./lib/metamask"
5
- import { useTaunt } from "./lib/tauntContext"
6
- import { TauntProvider } from "./lib/tauntProvider"
7
-
8
- function App() {
9
- return (
10
- <TauntProvider
11
- tauntServiceEndpoint={import.meta.env.VITE_TAUNT_SERVICE_ENDPOINT}
12
- magicKey={import.meta.env.VITE_MAGIC_KEY}>
13
- <div
14
- style={{
15
- display: "flex",
16
- flexDirection: "column",
17
- gap: 8,
18
- alignItems: "center"
19
- }}>
20
- <MagicEmailInput />
21
- <MetaMaskButton />
22
- <LogoutButton />
23
- <TauntDeets />
24
- </div>
25
- </TauntProvider>
26
- )
27
- }
28
-
29
- function LogoutButton() {
30
- const { deets } = useTaunt()
31
- if (!deets) return null
32
-
33
- return (
34
- <button
35
- className="ml-2 p-2 bg-blue-500 text-white rounded-md"
36
- type="button">
37
- Logout
38
- </button>
39
- )
40
- }
41
-
42
- function TauntDeets() {
43
- const { deets } = useTaunt()
44
- return (
45
- <textarea
46
- rows={5}
47
- cols={50}
48
- value={JSON.stringify(deets, null, 2)}
49
- readOnly
50
- />
51
- )
52
- }
53
-
54
- export default App
@@ -1,54 +0,0 @@
1
- // import "./App.css"
2
-
3
- import { MagicEmailInput } from "./lib/magic"
4
- import { MetaMaskButton } from "./lib/metamask"
5
- import { useTaunt } from "./lib/tauntContext"
6
- import { TauntProvider } from "./lib/tauntProvider"
7
-
8
- function App() {
9
- return (
10
- <TauntProvider
11
- tauntServiceEndpoint={import.meta.env.VITE_TAUNT_SERVICE_ENDPOINT}
12
- magicKey={import.meta.env.VITE_MAGIC_KEY}>
13
- <div
14
- style={{
15
- display: "flex",
16
- flexDirection: "column",
17
- gap: 8,
18
- alignItems: "center"
19
- }}>
20
- <MagicEmailInput />
21
- <MetaMaskButton />
22
- <LogoutButton />
23
- <TauntDeets />
24
- </div>
25
- </TauntProvider>
26
- )
27
- }
28
-
29
- function LogoutButton() {
30
- const { deets } = useTaunt()
31
- if (!deets) return null
32
-
33
- return (
34
- <button
35
- className="ml-2 p-2 bg-blue-500 text-white rounded-md"
36
- type="button">
37
- Logout
38
- </button>
39
- )
40
- }
41
-
42
- function TauntDeets() {
43
- const { deets } = useTaunt()
44
- return (
45
- <textarea
46
- rows={5}
47
- cols={50}
48
- value={JSON.stringify(deets, null, 2)}
49
- readOnly
50
- />
51
- )
52
- }
53
-
54
- export default App
File without changes
@@ -1,3 +0,0 @@
1
- export * from "./magic"
2
- export * from "./metamask"
3
- export * from "./taunt"
File without changes
@@ -1 +0,0 @@
1
- export * from "./exports"
File without changes
@@ -1,44 +0,0 @@
1
- import { tauntMagicDidLogin } from "@redzone/taunt-logins"
2
- import { useCallback, useMemo, useState } from "react"
3
-
4
- import { useTaunt } from "./tauntContext"
5
-
6
- export const Emailer = ({ onEmail }: { onEmail?: (email: string) => void }) => {
7
- const { tauntServiceEndpoint } = useTaunt()
8
- const [email, setEmail] = useState<string>()
9
-
10
- const initialised = useMemo(() => email !== undefined, [email])
11
-
12
- const validEmail = useMemo(() => {
13
- const validRegex =
14
- /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/
15
- return email?.match(validRegex) ? email : undefined
16
- }, [email])
17
-
18
- const runMagic = useCallback(() => {
19
- if (!validEmail) return
20
-
21
- if (onEmail) {
22
- onEmail(email!)
23
- } else {
24
- tauntMagicDidLogin(tauntServiceEndpoint, email!)
25
- }
26
- }, [validEmail, onEmail])
27
-
28
- return (
29
- <div>
30
- {initialised && !validEmail && (
31
- <div style={{ color: "red" }}>Please enter a valid email</div>
32
- )}
33
- <input
34
- onChange={(e) => setEmail(e.target.value)}
35
- placeholder="Enter your email"
36
- type="email"
37
- value={email}
38
- />
39
- <button onClick={runMagic} type="button">
40
- Send Magic Link
41
- </button>
42
- </div>
43
- )
44
- }
@@ -1,28 +0,0 @@
1
- import { tauntMagicDidLogin } from "@redzone/taunt-logins"
2
- import { useCallback, useMemo, useState } from "react"
3
-
4
- import { useTaunt } from "./tauntContext"
5
-
6
- export const MetaMaskButton = ({openMetamask}: {openMetamask?: () => void}) => {
7
- const { metamaskLogin } = useTaunt()
8
-
9
- const runMetamask = useCallback(() => {
10
- if(openMetamask) {
11
- openMetamask()
12
- } else {
13
-
14
- metamaskLogin()
15
- }
16
- }, [metamaskLogin, openMetamask])
17
-
18
- return (
19
-
20
- <button
21
- className="ml-2 p-2 bg-blue-500 text-white rounded-md"
22
- onClick={runMetamask}
23
- type="button">
24
- Login with Metamask
25
- </button>
26
- )
27
- }
28
- }
@@ -1,28 +0,0 @@
1
- import { tauntMagicDidLogin } from "@redzone/taunt-logins"
2
- import { useCallback, useMemo, useState } from "react"
3
-
4
- import { useTaunt } from "./tauntContext"
5
-
6
- export const MetaMaskButton = ({openMetamask}: {openMetamask?: () => void}) => {
7
- const { metamaskLogin } = useTaunt()
8
-
9
- const runMetamask = useCallback(() => {
10
- if(openMetamask) {
11
- openMetamask()
12
- } else {
13
-
14
- metamaskLogin()
15
- }
16
- }, [metamaskLogin, openMetamask])
17
-
18
- return (
19
-
20
- <button
21
- className="ml-2 p-2 bg-blue-500 text-white rounded-md"
22
- onClick={runMetamask}
23
- type="button">
24
- Login with Metamask
25
- </button>
26
- )
27
- }
28
- }