Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 895b8afc72 | |||
| afa1e38694 | |||
| 74aa63ca5d | |||
| fc70863206 | |||
| 2833f5708a | |||
| 1e56980142 | |||
| b4ac654bbf | |||
| 2786e26d2b |
67
src/app/admin/page.tsx
Normal file
67
src/app/admin/page.tsx
Normal file
@@ -0,0 +1,67 @@
|
||||
"use client";
|
||||
|
||||
import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider";
|
||||
import { useState } from "react";
|
||||
import { LayoutDashboard, Package, LogOut } from "lucide-react";
|
||||
|
||||
export default function AdminPanel() {
|
||||
const [isAuthenticated, setIsAuthenticated] = useState(false);
|
||||
const [activeTab, setActiveTab] = useState('dashboard');
|
||||
|
||||
if (!isAuthenticated) {
|
||||
return (
|
||||
<div className="flex min-h-screen items-center justify-center">
|
||||
<div className="w-full max-w-sm p-8 bg-card rounded shadow">
|
||||
<h1 className="text-2xl font-bold mb-6">Admin Login</h1>
|
||||
<button onClick={() => setIsAuthenticated(true)} className="w-full p-2 bg-primary text-white rounded">
|
||||
Sign In
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<ThemeProvider
|
||||
defaultButtonVariant="hover-magnetic"
|
||||
defaultTextAnimation="entrance-slide"
|
||||
borderRadius="rounded"
|
||||
contentWidth="medium"
|
||||
sizing="medium"
|
||||
background="circleGradient"
|
||||
cardStyle="glass-elevated"
|
||||
primaryButtonStyle="gradient"
|
||||
secondaryButtonStyle="glass"
|
||||
headingFontWeight="normal"
|
||||
>
|
||||
<div className="min-h-screen flex bg-background">
|
||||
<aside className="w-64 border-r border-border p-6">
|
||||
<h2 className="text-xl font-bold mb-8">ASTHAM Admin</h2>
|
||||
<nav className="space-y-4">
|
||||
<button onClick={() => setActiveTab('dashboard')} className="flex items-center gap-3 w-full p-2 hover:bg-accent rounded">
|
||||
<LayoutDashboard size={20} /> Dashboard
|
||||
</button>
|
||||
<button onClick={() => setActiveTab('products')} className="flex items-center gap-3 w-full p-2 hover:bg-accent rounded">
|
||||
<Package size={20} /> Products
|
||||
</button>
|
||||
<button onClick={() => setIsAuthenticated(false)} className="flex items-center gap-3 w-full p-2 text-red-500 hover:bg-red-50 rounded mt-10">
|
||||
<LogOut size={20} /> Logout
|
||||
</button>
|
||||
</nav>
|
||||
</aside>
|
||||
<main className="flex-1 p-8">
|
||||
<h1 className="text-3xl font-bold mb-6 capitalize">{activeTab}</h1>
|
||||
<div className="grid gap-6">
|
||||
<div className="p-6 bg-card border rounded">
|
||||
{activeTab === 'dashboard' ? (
|
||||
<p>Welcome to the dashboard. Use the sidebar to manage products.</p>
|
||||
) : (
|
||||
<p>Product Management Interface (CRUD operations would be initialized here).</p>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
</ThemeProvider>
|
||||
);
|
||||
}
|
||||
@@ -35,6 +35,7 @@ export default function LandingPage() {
|
||||
{ name: "Story", id: "about" },
|
||||
{ name: "Products", id: "products" },
|
||||
{ name: "Contact", id: "contact" },
|
||||
{ name: "Admin", id: "/admin" },
|
||||
]}
|
||||
brandName="ASTHAM"
|
||||
button={{ text: "Get Started", href: "#contact" }}
|
||||
|
||||
Reference in New Issue
Block a user