diff --git a/src/app/add-funds/page.tsx b/src/app/add-funds/page.tsx
new file mode 100644
index 0000000..0f82970
--- /dev/null
+++ b/src/app/add-funds/page.tsx
@@ -0,0 +1,137 @@
+"use client";
+
+import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider";
+import ReactLenis from "lenis/react";
+import NavbarStyleFullscreen from '@/components/navbar/NavbarStyleFullscreen/NavbarStyleFullscreen';
+import FooterBase from '@/components/sections/footer/FooterBase';
+
+export default function AddFundsPage() {
+ return (
+
+
+
+
+
+
+
+
+
Add Funds
+
Top up your account balance securely.
+
+
+
+
+
+
+
+
+ );
+}
diff --git a/src/app/admin/dashboard/layout.tsx b/src/app/admin/dashboard/layout.tsx
new file mode 100644
index 0000000..103ab53
--- /dev/null
+++ b/src/app/admin/dashboard/layout.tsx
@@ -0,0 +1,101 @@
+"use client";
+
+import { useState, useEffect } from "react";
+import Link from "next/link";
+import { usePathname, useRouter } from "next/navigation";
+import { Home, ShoppingCart, Users, Settings, Package } from "lucide-react";
+
+// Mock authentication check
+const isAuthenticated = () => {
+ // In a real app, this would check tokens, sessions, etc.
+ // For this exercise, we'll simulate a logged-in state.
+ return typeof window !== "undefined" && localStorage.getItem("admin_logged_in") === "true";
+};
+
+const logout = () => {
+ if (typeof window !== "undefined") {
+ localStorage.removeItem("admin_logged_in");
+ }
+};
+
+const adminNavItems = [
+ { name: "Overview", href: "/admin/dashboard/overview", icon: Home },
+ { name: "Services", href: "/admin/dashboard/services", icon: Package },
+ { name: "Orders", href: "/admin/dashboard/orders", icon: ShoppingCart },
+ { name: "Users", href: "/admin/dashboard/users", icon: Users },
+ { name: "Settings", href: "/admin/dashboard/settings", icon: Settings },
+];
+
+export default function AdminDashboardLayout({
+ children,
+}: {
+ children: React.ReactNode;
+}) {
+ const router = useRouter();
+ const pathname = usePathname();
+ const [isAuth, setIsAuth] = useState(false);
+
+ useEffect(() => {
+ if (!isAuthenticated()) {
+ router.push("/admin/login");
+ } else {
+ setIsAuth(true);
+ }
+ }, [router]);
+
+ const handleLogout = () => {
+ logout();
+ router.push("/admin/login");
+ };
+
+ if (!isAuth) {
+ return (
+
+
Redirecting to login...
+
+ );
+ }
+
+ return (
+
+ {/* Sidebar */}
+
+
+ {/* Main Content */}
+
{children}
+
+ );
+}
\ No newline at end of file
diff --git a/src/app/admin/dashboard/overview/page.tsx b/src/app/admin/dashboard/overview/page.tsx
new file mode 100644
index 0000000..8aa5532
--- /dev/null
+++ b/src/app/admin/dashboard/overview/page.tsx
@@ -0,0 +1,139 @@
+"use client";
+
+import { DollarSign, ShoppingCart, Users, TrendingUp } from "lucide-react";
+import MetricCardThree from "@/components/sections/metrics/MetricCardThree"; // Re-using existing component
+
+export default function AdminOverviewPage() {
+ const revenueMetrics = [
+ {
+ id: "total_revenue", icon: DollarSign,
+ title: "Total Revenue", value: "$1,234,567"},
+ {
+ id: "monthly_revenue", icon: TrendingUp,
+ title: "Monthly Revenue", value: "$89,123"},
+ {
+ id: "total_orders", icon: ShoppingCart,
+ title: "Total Orders", value: "15,678"},
+ {
+ id: "new_users", icon: Users,
+ title: "New Users (Last 30 Days)", value: "450"},
+ ];
+
+ const recentOrders = [
+ {
+ id: "ORD001", customer: "John Doe", service: "Instagram Likes", amount: "$15.00", status: "Completed", date: "2023-10-26"},
+ {
+ id: "ORD002", customer: "Jane Smith", service: "YouTube Subscribers", amount: "$50.00", status: "Pending", date: "2023-10-25"},
+ {
+ id: "ORD003", customer: "Alice Johnson", service: "TikTok Views", amount: "$10.50", status: "Completed", date: "2023-10-25"},
+ {
+ id: "ORD004", customer: "Bob Brown", service: "Twitter Retweets", amount: "$5.00", status: "Processing", date: "2023-10-24"},
+ {
+ id: "ORD005", customer: "Charlie Green", service: "Facebook Page Likes", amount: "$20.00", status: "Completed", date: "2023-10-24"},
+ ];
+
+ return (
+
+
Dashboard Overview
+
+
+
Revenue Statistics
+
+
+
+
+
Recent Orders
+
+
+
+
+ |
+ Order ID
+ |
+
+ Customer
+ |
+
+ Service
+ |
+
+ Amount
+ |
+
+ Status
+ |
+
+ Date
+ |
+
+
+
+ {recentOrders.map((order) => (
+
+ |
+ {order.id}
+ |
+
+ {order.customer}
+ |
+
+ {order.service}
+ |
+
+ {order.amount}
+ |
+
+
+ {order.status}
+
+ |
+
+ {order.date}
+ |
+
+ ))}
+
+
+
+
+
+ );
+}
\ No newline at end of file
diff --git a/src/app/admin/login/page.tsx b/src/app/admin/login/page.tsx
index 2e6eda5..c7ba01e 100644
--- a/src/app/admin/login/page.tsx
+++ b/src/app/admin/login/page.tsx
@@ -1,101 +1,92 @@
"use client";
-import { useState } from 'react';
-import { useRouter } from 'next/navigation';
-import { ThemeProvider } from '@/providers/themeProvider/ThemeProvider';
-import NavbarStyleFullscreen from '@/components/navbar/NavbarStyleFullscreen/NavbarStyleFullscreen';
+import { useState } from "react";
+import Link from "next/link";
export default function AdminLoginPage() {
- const [email, setEmail] = useState('');
- const [password, setPassword] = useState('');
- const [error, setError] = useState('');
- const router = useRouter();
+ const [email, setEmail] = useState("");
+ const [password, setPassword] = useState("");
+ const [error, setError] = useState("");
- const handleLogin = async (e: React.FormEvent) => {
+ const handleSubmit = (e: React.FormEvent) => {
e.preventDefault();
- setError('');
-
- if (email === "admin@demo.com" && password === "Admin@123") {
- localStorage.setItem('adminToken', 'mock-admin-token');
- document.cookie = 'adminToken=mock-admin-token; path=/; max-age=3600;';
- router.push('/admin/dashboard');
+ setError("");
+ // In a real application, you would send these credentials to an API route
+ // for authentication. For this exercise, we'll simulate a basic check.
+ if (email === "admin@example.com" && password === "password") {
+ if (typeof window !== "undefined") {
+ localStorage.setItem("admin_logged_in", "true");
+ }
+ alert("Login successful! Redirecting to dashboard...");
+ // Simulate redirect to admin dashboard
+ window.location.href = "/admin/dashboard/overview";
} else {
- setError('Invalid email or password.');
+ setError("Invalid email or password.");
}
};
- const navItems = [
- { name: "Home", id: "/" },
- { name: "Services", id: "/services" },
- { name: "Pricing", id: "/pricing" },
- { name: "FAQ", id: "/faq" },
- { name: "Contact", id: "/contact" },
- { name: "Admin Login", id: "/admin/login" }
- ];
-
return (
-
-
-
-
-
-