From 6754cbb704d6e467d029a501248ebe8fd721db94 Mon Sep 17 00:00:00 2001 From: Joseph Chalabi Date: Tue, 7 Jan 2025 20:04:13 -0700 Subject: [PATCH 1/2] feat: sexier landing pages --- pages/bank.tsx | 126 ++++++++++++++++++++++++++++------------ pages/factory/index.tsx | 100 +++++++++++++++++++------------ 2 files changed, 154 insertions(+), 72 deletions(-) diff --git a/pages/bank.tsx b/pages/bank.tsx index ba708ff..53d285e 100644 --- a/pages/bank.tsx +++ b/pages/bank.tsx @@ -16,6 +16,7 @@ import { MFX_TOKEN_DATA } from '@/utils/constants'; import env from '@/config/env'; import { SEO } from '@/components'; import { useResponsivePageSize } from '@/hooks/useResponsivePageSize'; +import Link from 'next/link'; interface PageSizeConfig { tokenList: number; @@ -149,16 +150,18 @@ export default function Bank() { > Bank -
- setSearchTerm(e.target.value)} - /> - -
+ {combinedBalances.length > 0 && ( +
+ setSearchTerm(e.target.value)} + /> + +
+ )}
- {activeTab === 'assets' && ( - - )} - {activeTab === 'history' && ( - - )} + {activeTab === 'assets' && + (combinedBalances.length === 0 ? ( + + ) : ( + + ))} + {activeTab === 'history' && + (sendTxs.length === 0 ? ( + + ) : ( + + ))}
@@ -224,3 +233,48 @@ export default function Bank() { ); } + +function NoAssetsFound() { + return ( +
+
+
+

+ No Assets Found +

+

+ You do not have any assets yet. Create a new asset in the factory page or request MFX + from the faucet! +

+ + + +
+
+ +
+
+
+ ); +} + +function NoActivityFound() { + return ( +
+
+
+

+ No Activity Found +

+

+ You do not have any activity yet. Submit a transaction and revisit this page to view + your history! +

+
+
+ +
+
+
+ ); +} diff --git a/pages/factory/index.tsx b/pages/factory/index.tsx index cb4a216..bc172cd 100644 --- a/pages/factory/index.tsx +++ b/pages/factory/index.tsx @@ -15,6 +15,7 @@ import { SEO } from '@/components'; import env from '@/config/env'; import { useResponsivePageSize } from '@/hooks/useResponsivePageSize'; +import Link from 'next/link'; interface PageSizeConfig { denomList: number; @@ -117,46 +118,50 @@ export default function Factory() { /> ) : (
-
-
-
-

- Tokens -

-
- setSearchTerm(e.target.value)} - /> - + {combinedData.length > 0 ? ( +
+
+
+

+ Tokens +

+
+ setSearchTerm(e.target.value)} + /> + +
-
-
- {isError ? ( -
- Error loading tokens. Please try again. -
- ) : ( - - )} +
+ {isError ? ( +
+ Error loading tokens. Please try again. +
+ ) : ( + + )} +
-
+ ) : ( + + )}
)}
@@ -164,3 +169,26 @@ export default function Factory() {
); } + +function NoAssetsFound() { + return ( +
+
+
+

+ No Assets Found +

+

+ You do not have any factory assets yet. Create a new asset in the factory page! +

+ + + +
+
+ +
+
+
+ ); +} From 8dc6bcfb1d003ae1c6c7b4344a4b36360a8447ec Mon Sep 17 00:00:00 2001 From: "Felix C. Morency" <1102868+fmorency@users.noreply.github.com> Date: Wed, 8 Jan 2025 10:12:58 -0500 Subject: [PATCH 2/2] fix: label --- pages/bank.tsx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/pages/bank.tsx b/pages/bank.tsx index 53d285e..12e5908 100644 --- a/pages/bank.tsx +++ b/pages/bank.tsx @@ -243,12 +243,8 @@ function NoAssetsFound() { No Assets Found

- You do not have any assets yet. Create a new asset in the factory page or request MFX - from the faucet! + You do not have any assets yet.

- - -