@@ -10,16 +10,15 @@ import Shape from '@site/static/img/shapes/intro-cards/shape.svg';
10
10
import styles from './NavigationOverlay.module.css' ;
11
11
import {
12
12
METAMASK_SDK ,
13
- EMBEDDED_WALLETS ,
14
- DELEGATION_TOOLKIT
13
+ EMBEDDED_WALLETS
15
14
} from '../builder/choices' ;
16
15
17
16
interface NavigationOption {
18
17
id : string ;
19
18
title : string ;
20
19
description : string ;
21
- icon ?: string ;
22
- product : string ;
20
+ product ?: string ;
21
+ link ? : string ;
23
22
}
24
23
25
24
interface NavigationFlowProps {
@@ -28,34 +27,59 @@ interface NavigationFlowProps {
28
27
29
28
const navigationOptions : NavigationOption [ ] = [
30
29
{
31
- id : 'connect-wallets' ,
32
- title : "I want to connect users' wallets to my dApp" ,
33
- description : "Enable wallet connections for Web3 interactions" ,
34
- icon : "🔗" ,
30
+ id : 'mm-sdk' ,
31
+ title : "I want to connect to users' MetaMask Wallet" ,
32
+ description : "MetaMask SDK" ,
35
33
product : METAMASK_SDK
36
34
} ,
37
35
{
38
- id : 'create-wallets' ,
39
- title : "I want to create wallets inside my application" ,
40
- description : "Embed wallet functionality directly in your app" ,
41
- icon : "💳" ,
36
+ id : 'embedded-wallets-1' ,
37
+ title : "I want to create wallets inside my dApp/ Mobile App" ,
38
+ description : "Embedded Wallets" ,
42
39
product : EMBEDDED_WALLETS
43
40
} ,
44
41
{
45
- id : 'gasless-transactions' ,
46
- title : "I want to manage gasless transactions" ,
47
- description : "Handle transaction fees for your users" ,
48
- icon : "⚡" ,
49
- product : DELEGATION_TOOLKIT
50
- }
42
+ id : 'embedded-wallets-2' ,
43
+ title : "I want a Wallet Aggregator for my dApp" ,
44
+ description : "Embedded Wallets" ,
45
+ product : EMBEDDED_WALLETS
46
+ } ,
47
+ {
48
+ id : 'delegation-toolkit-1' ,
49
+ title : "I want to manage Gasless Transactions" ,
50
+ description : "Delegation Toolkit" ,
51
+ link : "/delegation-toolkit"
52
+ } ,
53
+ {
54
+ id : 'delegation-toolkit-2' ,
55
+ title : "I want to Delegate Permission for my users" ,
56
+ description : "Delegation Toolkit" ,
57
+ link : "/delegation-toolkit"
58
+ } ,
59
+ {
60
+ id : 'delegation-toolkit-3' ,
61
+ title : "I want to convert EOAs to Smart Wallets" ,
62
+ description : "Delegation Toolkit" ,
63
+ link : "/delegation-toolkit"
64
+ } ,
65
+ {
66
+ id : 'delegation-toolkit-4' ,
67
+ title : "I want to request Readable Permissions" ,
68
+ description : "Delegation Toolkit" ,
69
+ link : "/delegation-toolkit"
70
+ } ,
51
71
] ;
52
72
53
73
const NavigationFlow : React . FC < NavigationFlowProps > = ( { onSelect } ) => {
54
74
const { colorMode } = useColorMode ( ) ;
55
75
const [ hoveredCard , setHoveredCard ] = useState < string | null > ( null ) ;
56
76
57
77
const handleOptionSelect = ( option : NavigationOption ) => {
58
- onSelect ( option . product ) ;
78
+ if ( option . product ) {
79
+ onSelect ( option . product ) ;
80
+ } else if ( option . link ) {
81
+ window . location . href = option . link ;
82
+ }
59
83
} ;
60
84
61
85
return (
@@ -83,7 +107,6 @@ const NavigationFlow: React.FC<NavigationFlowProps> = ({ onSelect }) => {
83
107
< Shape className = { styles . cardShape } />
84
108
85
109
< div className = { styles . cardHeader } >
86
- < SvgStar className = { styles . cardIcon } />
87
110
< Heading as = "h3" className = { styles . cardTitle } >
88
111
{ option . title }
89
112
</ Heading >
@@ -95,7 +118,7 @@ const NavigationFlow: React.FC<NavigationFlowProps> = ({ onSelect }) => {
95
118
</ p >
96
119
< Button
97
120
as = "button"
98
- label = { false }
121
+ label = { option . product ? "Use Builder" : "View Docs" }
99
122
type = { colorMode === 'dark' ? 'secondary' : 'primary' }
100
123
icon = "arrow-right"
101
124
className = { styles . cardButton }
0 commit comments