responsivité de l'admin
This commit is contained in:
parent
bc08395e50
commit
f8ff85c865
@ -114,21 +114,21 @@ function Header() {
|
|||||||
<Link
|
<Link
|
||||||
to="/dashboard"
|
to="/dashboard"
|
||||||
className="block px-4 py-2 text-gray-700 hover:bg-gray-100"
|
className="block px-4 py-2 text-gray-700 hover:bg-gray-100"
|
||||||
onClick={() => setShowAdminDropdown(false)}
|
onClick={() => {setShowAdminDropdown(false);setIsMenuOpen(false);}}
|
||||||
>
|
>
|
||||||
Dashboard
|
Dashboard
|
||||||
</Link>
|
</Link>
|
||||||
<Link
|
<Link
|
||||||
to="/user"
|
to="/user"
|
||||||
className="block px-4 py-2 text-gray-700 hover:bg-gray-100"
|
className="block px-4 py-2 text-gray-700 hover:bg-gray-100"
|
||||||
onClick={() => setShowAdminDropdown(false)}
|
onClick={() => {setShowAdminDropdown(false);setIsMenuOpen(false);}}
|
||||||
>
|
>
|
||||||
Gestion des Utilisateurs
|
Gestion des Utilisateurs
|
||||||
</Link>
|
</Link>
|
||||||
<Link
|
<Link
|
||||||
to="/adminobjet"
|
to="/adminobjet"
|
||||||
className="block px-4 py-2 text-gray-700 hover:bg-gray-100"
|
className="block px-4 py-2 text-gray-700 hover:bg-gray-100"
|
||||||
onClick={() => setShowAdminDropdown(false)}
|
onClick={() => {setShowAdminDropdown(false);setIsMenuOpen(false);}}
|
||||||
>
|
>
|
||||||
Gestion des Objets Connectés
|
Gestion des Objets Connectés
|
||||||
</Link>
|
</Link>
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import React, { useState, useEffect } from "react";
|
import React, { useState, useEffect } from "react";
|
||||||
import Sidebar from "./sidebar.jsx";
|
import Sidebar from "./sidebar.jsx";
|
||||||
import { RadioTower, ArrowRight, BadgePlus, Settings } from "lucide-react";
|
import { RadioTower,Minus, ArrowRight, BadgePlus, Settings } from "lucide-react";
|
||||||
import { API_BASE_URL } from "../../config.js";
|
import { API_BASE_URL } from "../../config.js";
|
||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
|
|
||||||
@ -38,7 +38,6 @@ const initialWidgets = [
|
|||||||
{ id: 3, type: "reporting" },
|
{ id: 3, type: "reporting" },
|
||||||
{ id: 4, type: "adminobjet" },
|
{ id: 4, type: "adminobjet" },
|
||||||
{ id: 5, type: "objects" },
|
{ id: 5, type: "objects" },
|
||||||
{ id: 6, type: "requestObject" },
|
|
||||||
];
|
];
|
||||||
|
|
||||||
function Dashboard() {
|
function Dashboard() {
|
||||||
@ -126,7 +125,7 @@ function Dashboard() {
|
|||||||
onClick={() => handleDeleteWidget(widget.id)}
|
onClick={() => handleDeleteWidget(widget.id)}
|
||||||
className="absolute top-2 right-2 bg-red-600 text-white rounded-full w-6 h-6 flex items-center justify-center"
|
className="absolute top-2 right-2 bg-red-600 text-white rounded-full w-6 h-6 flex items-center justify-center"
|
||||||
>
|
>
|
||||||
–
|
<Minus />
|
||||||
</button>
|
</button>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
|||||||
@ -5,7 +5,7 @@ function Sidebar({ isOpen, toggleSidebar }) {
|
|||||||
return (
|
return (
|
||||||
<aside
|
<aside
|
||||||
className={`
|
className={`
|
||||||
bg-gray-800 text-white p-5 h-screen w-64 fixed top-0 left-0 z-40
|
bg-gray-800 text-white p-5 w-64 fixed top-0 left-0 z-40
|
||||||
transform transition-transform duration-200 ease-in-out
|
transform transition-transform duration-200 ease-in-out
|
||||||
${isOpen ? "translate-x-0" : "-translate-x-full"}
|
${isOpen ? "translate-x-0" : "-translate-x-full"}
|
||||||
md:static md:translate-x-0
|
md:static md:translate-x-0
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user