From ddc251fda3f052d2cde4f531e38aed70403ff690 Mon Sep 17 00:00:00 2001 From: Kurdistan Tech Ministry Date: Tue, 14 Apr 2026 17:50:57 +0300 Subject: [PATCH] feat: add Exchange button in finance card linking to exchange.pezkuwichain.io - Use PezkuwiExchange.png logo instead of emoji for exchange app icon - External link opens exchange.pezkuwichain.io in new tab (noopener) - No auth required (exchange is publicly accessible) - Added imgIcon and href fields to AppItem interface --- web/src/components/MobileHomeLayout.tsx | 28 ++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/web/src/components/MobileHomeLayout.tsx b/web/src/components/MobileHomeLayout.tsx index ca730dfc..e89b551e 100644 --- a/web/src/components/MobileHomeLayout.tsx +++ b/web/src/components/MobileHomeLayout.tsx @@ -33,7 +33,9 @@ const getEmojiFromAvatarId = (avatarId: string): string => { interface AppItem { title: string; icon: string; + imgIcon?: string; // image path instead of emoji route: string; + href?: string; // external URL (opens in new tab) comingSoon?: boolean; requiresAuth?: boolean; } @@ -54,7 +56,7 @@ const APP_SECTIONS: AppSection[] = [ apps: [ { title: 'mobile.app.wallet', icon: '👛', route: '/wallet' }, { title: 'mobile.app.bank', icon: '🏦', route: '/finance/bank' }, - { title: 'mobile.app.exchange', icon: '💱', route: '/dex', requiresAuth: true }, + { title: 'mobile.app.exchange', icon: '💱', imgIcon: '/PezkuwiExchange.png', route: '/dex', href: 'https://exchange.pezkuwichain.io' }, { title: 'mobile.app.p2p', icon: '🤝', route: '/p2p', requiresAuth: true }, { title: 'mobile.app.b2b', icon: '🤖', route: '/bereketli', requiresAuth: true }, { title: 'mobile.app.bacZekat', icon: '💰', route: '/finance/zekat' }, @@ -292,19 +294,31 @@ const MobileHomeLayout: React.FC = () => {
{section.apps.map((app) => { const needsLogin = app.requiresAuth && !user; + + function handleClick() { + if (app.comingSoon) return; + if (needsLogin) { navigate('/login'); return; } + if (app.href) { window.open(app.href, '_blank', 'noopener,noreferrer'); return; } + navigate(app.route); + } + return (