From 546e7bd2453a6317449031e42a798df68698ba80 Mon Sep 17 00:00:00 2001 From: NotII <46204250+NotII@users.noreply.github.com> Date: Fri, 28 Mar 2025 22:36:45 +0000 Subject: [PATCH] Update page.tsx --- app/page.tsx | 327 ++++++++++++++++++++++++++------------------------- 1 file changed, 169 insertions(+), 158 deletions(-) diff --git a/app/page.tsx b/app/page.tsx index d40cbd7..ac7044b 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -6,13 +6,19 @@ import { fetchPlatformStats } from "@/lib/stats-service"; import { HomeNavbar } from "@/components/home-navbar"; import { Suspense } from "react"; +// Constants +const PY_20 = 20; +const PY_32 = 32; +const PX_6 = 6; +const PX_10 = 10; + // Format number with commas -function formatNumber(num: number): string { +function formatNumberValue(num: number): string { return new Intl.NumberFormat().format(Math.round(num)); } // Format currency -function formatCurrency(amount: number): string { +function formatCurrencyValue(amount: number): string { return new Intl.NumberFormat('en-GB', { style: 'currency', currency: 'GBP', @@ -22,167 +28,172 @@ function formatCurrency(amount: number): string { // This is a server component export default async function Home() { - const stats = await fetchPlatformStats(); + try { + const stats = await fetchPlatformStats(); - return ( -
- + return ( +
+ - {/* Hero Section */} -
-
-

- Streamlined E-commerce Management -

-

- Ember provides everything you need to manage your e-commerce business efficiently in one place, with secure cryptocurrency payments. -

-
-
- - - - - - -
-
- - {/* Statistics Section */} -
-
- Loading statistics...
}> -
-
- -
{formatNumber(stats.orders.completed)}+
-
Orders Processed
-

Successfully delivered to customers around the world

-
-
- -
{formatNumber(stats.vendors.total)}+
-
Registered Vendors
-

Trusted merchants selling on our platform

-
-
- -
{formatCurrency(stats.transactions.volume)}
-
Transaction Volume
-

Securely processed by our platform

-
-
- -
- - - {/* Features Section */} -
-
-
-

Powerful Features

-

- Everything you need to manage orders, track metrics, and grow your business. + {/* Hero Section */} +

+
+

+ Streamlined E-commerce Management +

+

+ Ember provides everything you need to manage your e-commerce business efficiently in one place, with secure cryptocurrency payments.

-
-
-
-
- -
-

Cryptocurrency Payments

-
-

- Accept payments in various cryptocurrencies with our secure, integrated payment system designed for maximum privacy and security. -

-
-
-
-
- -
-

Order Tracking

-
-

- Manage and track orders from receipt to delivery with our intuitive order management system. -

-
-
-
-
- -
-

Fast Performance

-
-

- Lightning-fast dashboard with real-time updates gives you the information you need when you need it. -

-
-
-
-
- - {/* Benefits Section */} -
-
-
-

Why Choose Ember

-

- Our platform is designed to make e-commerce management simple and efficient. -

-
-
-
-

Centralized Management

-

- Manage all aspects of your e-commerce business from a single dashboard. -

-
-
-

Advanced Analytics

-

- Gain insights into your business with detailed analytics and reporting tools. -

-
-
-

Customer Management

-

- Keep track of customer information and purchase history to provide better service. -

-
-
-

Inventory Control

-

- Manage your inventory with precision to avoid stock-outs and overstocking. -

-
-
-
+
- + + + +
-
-
+ - {/* Footer */} - -
- ); -} \ No newline at end of file + {/* Statistics Section */} +
+
+ Loading statistics...
}> +
+
+ +
{formatNumberValue(stats.orders.completed)}+
+
Orders Processed
+

Successfully delivered to customers around the world

+
+
+ +
{formatNumberValue(stats.vendors.total)}+
+
Registered Vendors
+

Trusted merchants selling on our platform

+
+
+ +
{formatCurrencyValue(stats.transactions.volume)}
+
Transaction Volume
+

Securely processed by our platform

+
+
+ + +
+ + {/* Features Section */} +
+
+
+

Powerful Features

+

+ Everything you need to manage orders, track metrics, and grow your business. +

+
+
+
+
+
+ +
+

Cryptocurrency Payments

+
+

+ Accept payments in various cryptocurrencies with our secure, integrated payment system designed for maximum privacy and security. +

+
+
+
+
+ +
+

Order Tracking

+
+

+ Manage and track orders from receipt to delivery with our intuitive order management system. +

+
+
+
+
+ +
+

Fast Performance

+
+

+ Lightning-fast dashboard with real-time updates gives you the information you need when you need it. +

+
+
+
+
+ + {/* Benefits Section */} +
+
+
+

Why Choose Ember

+

+ Our platform is designed to make e-commerce management simple and efficient. +

+
+
+
+

Centralized Management

+

+ Manage all aspects of your e-commerce business from a single dashboard. +

+
+
+

Advanced Analytics

+

+ Gain insights into your business with detailed analytics and reporting tools. +

+
+
+

Customer Management

+

+ Keep track of customer information and purchase history to provide better service. +

+
+
+

Inventory Control

+

+ Manage your inventory with precision to avoid stock-outs and overstocking. +

+
+
+
+ + + +
+
+
+ + {/* Footer */} + + + ); + } catch (error) { + console.error(error); + return
Error loading page
; + } +}