diff --git a/src/app/admin/page.jsx b/src/app/admin/page.jsx
index 2ebf471..1fb863c 100644
--- a/src/app/admin/page.jsx
+++ b/src/app/admin/page.jsx
@@ -1,91 +1,102 @@
-import React from 'react';
-import { Pencil, Trash, Plus } from 'lucide-react';
+"use client";
+import { useState } from 'react';
+import { PlusCircle, Pencil, Trash2, ImagePlus } from 'lucide-react';
-const AdminDashboard = () => {
- // Dados de exemplo (depois virão do backend)
- const cars = [
+export default function AdminPage() {
+ const [cars, setCars] = useState([
{
id: 1,
- name: 'BMW M4 2024',
- price: 75000,
- image: '/api/placeholder/200/150',
- isSpecial: true
- },
- {
- id: 2,
- name: 'Mercedes-Benz C-Class 2015',
+ name: 'MERCEDES-BENZ C-CLASS 2015',
price: 35000,
- image: '/api/placeholder/200/150',
- isSpecial: true
+ special: true
}
- ];
+ ]);
+
+ const handleDelete = async (id) => {
+ if (confirm('Are you sure you want to delete this car?')) {
+ // Aqui virá a deleção via API
+ setCars(cars.filter(car => car.id !== id));
+ }
+ };
return (
-
-
-
-
LOGO
+
+
+
+
Car Management
+
-
Admin Panel
-
- {/* Add New Car Button */}
-
-
- {/* Cars List */}
-
-
-
Cars Management
-
-
+
+
-
+
- | Image |
- Name |
- Price |
- Special |
- Actions |
+
+ Image
+ |
+
+ Name
+ |
+
+ Price
+ |
+
+ Special
+ |
+
+ Actions
+ |
-
+
{cars.map((car) => (
-
-
- |
- {car.name} |
- ${car.price.toLocaleString()} |
-
- {car.isSpecial ? (
-
- Special
-
- ) : '-'}
- |
-
-
-
- |
))}
@@ -95,6 +106,4 @@ const AdminDashboard = () => {
);
-};
-
-export default AdminDashboard;
+}
\ No newline at end of file