From 0567e04debdb1d2d9cf8aa500bcbf8f724576925 Mon Sep 17 00:00:00 2001 From: NotII <46204250+NotII@users.noreply.github.com> Date: Fri, 28 Mar 2025 22:09:52 +0000 Subject: [PATCH] stats --- app/page.tsx | 218 +++++++++++++++++----------------- components/home-navbar.tsx | 92 ++++++++++++++ components/theme-switcher.tsx | 30 +++++ lib/stats-service.ts | 47 ++++++++ 4 files changed, 276 insertions(+), 111 deletions(-) create mode 100644 components/home-navbar.tsx create mode 100644 components/theme-switcher.tsx create mode 100644 lib/stats-service.ts diff --git a/app/page.tsx b/app/page.tsx index ecc7808..d0d7020 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -1,187 +1,183 @@ -"use client"; - import Link from "next/link"; -import { ArrowRight, Shield, Globe, Zap, LineChart, LogIn } from "lucide-react"; +import { ArrowRight, Shield, LineChart, Zap } from "lucide-react"; import { Button } from "@/components/ui/button"; import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"; +import { fetchPlatformStats } from "@/lib/stats-service"; +import { HomeNavbar } from "@/components/home-navbar"; +import { Suspense } from "react"; + +// Format number with commas +function formatNumber(num: number): string { + return new Intl.NumberFormat().format(Math.round(num)); +} + +// Format currency +function formatCurrency(amount: number): string { + return new Intl.NumberFormat('en-GB', { + style: 'currency', + currency: 'GBP', + maximumFractionDigits: 0 + }).format(amount); +} + +// This is a server component +export default async function Home() { + const stats = await fetchPlatformStats(); -export default function Home() { return ( -
+
Ember provides everything you need to manage your e-commerce business efficiently in one place, with secure cryptocurrency payments.
Successfully delivered to customers worldwide
+Trusted merchants selling on our platform
+Securely processed with cryptocurrency
++
Everything you need to manage orders, track metrics, and grow your business.
+ Accept payments in various cryptocurrencies with our secure, integrated payment system designed for maximum privacy and security. +
++ Manage and track orders from receipt to delivery with our intuitive order management system. +
++ Lightning-fast dashboard with real-time updates gives you the information you need when you need it. +
++
Our platform is designed to make e-commerce management simple and efficient.
+
Manage all aspects of your e-commerce business from a single dashboard.
+
Gain insights into your business with detailed analytics and reporting tools.
+
Keep track of customer information and purchase history to provide better service.
+
Manage your inventory with precision to avoid stock-outs and overstocking.