Skip to content

Commit 4154d3c

Browse files
committed
Update NavigationFlow.tsx
1 parent 3576ac3 commit 4154d3c

File tree

1 file changed

+44
-21
lines changed

1 file changed

+44
-21
lines changed

src/pages/playground/NavigationOverlay/NavigationFlow.tsx

Lines changed: 44 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,15 @@ import Shape from '@site/static/img/shapes/intro-cards/shape.svg';
1010
import styles from './NavigationOverlay.module.css';
1111
import {
1212
METAMASK_SDK,
13-
EMBEDDED_WALLETS,
14-
DELEGATION_TOOLKIT
13+
EMBEDDED_WALLETS
1514
} from '../builder/choices';
1615

1716
interface NavigationOption {
1817
id: string;
1918
title: string;
2019
description: string;
21-
icon?: string;
22-
product: string;
20+
product?: string;
21+
link?: string;
2322
}
2423

2524
interface NavigationFlowProps {
@@ -28,34 +27,59 @@ interface NavigationFlowProps {
2827

2928
const navigationOptions: NavigationOption[] = [
3029
{
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",
3533
product: METAMASK_SDK
3634
},
3735
{
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",
4239
product: EMBEDDED_WALLETS
4340
},
4441
{
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+
},
5171
];
5272

5373
const NavigationFlow: React.FC<NavigationFlowProps> = ({ onSelect }) => {
5474
const { colorMode } = useColorMode();
5575
const [hoveredCard, setHoveredCard] = useState<string | null>(null);
5676

5777
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+
}
5983
};
6084

6185
return (
@@ -83,7 +107,6 @@ const NavigationFlow: React.FC<NavigationFlowProps> = ({ onSelect }) => {
83107
<Shape className={styles.cardShape} />
84108

85109
<div className={styles.cardHeader}>
86-
<SvgStar className={styles.cardIcon} />
87110
<Heading as="h3" className={styles.cardTitle}>
88111
{option.title}
89112
</Heading>
@@ -95,7 +118,7 @@ const NavigationFlow: React.FC<NavigationFlowProps> = ({ onSelect }) => {
95118
</p>
96119
<Button
97120
as="button"
98-
label={false}
121+
label={option.product ? "Use Builder" : "View Docs"}
99122
type={colorMode === 'dark' ? 'secondary' : 'primary'}
100123
icon="arrow-right"
101124
className={styles.cardButton}

0 commit comments

Comments
 (0)