mirror of
https://git.v0id.ovh/n3wt-innov/n3wt-school.git
synced 2026-01-29 07:53:23 +00:00
Revert "fix: application des recommandations linter es pour générer un build de prod"
This reverts commit d1aa8b54fb.
This commit is contained in:
@ -26,7 +26,6 @@ import {
|
||||
|
||||
import { disconnect } from '@/app/lib/authAction';
|
||||
import { fetchEstablishment } from '@/app/lib/schoolAction';
|
||||
import Image from 'next/image';
|
||||
|
||||
export default function Layout({
|
||||
children,
|
||||
@ -76,13 +75,13 @@ export default function Layout({
|
||||
<>
|
||||
{!isLoading && (
|
||||
<div className="flex min-h-screen bg-gray-50">
|
||||
<Sidebar establishment={establishment} currentPage={currentPage} items={Object.values(sidebarItems)} className="h-full" />
|
||||
<Sidebar establishment={establishment} currentPage={currentPage} items={Object.values(sidebarItems)} className="h-full" />
|
||||
<div className="flex flex-col flex-1">
|
||||
{/* Header - h-16 = 64px */}
|
||||
<header className="h-16 bg-white border-b border-gray-200 px-8 py-4 flex items-center justify-between z-9">
|
||||
<div className="text-xl font-semibold">{headerTitle}</div>
|
||||
<DropdownMenu
|
||||
buttonContent={<Image src="https://i.pravatar.cc/32" alt="Profile" className="w-8 h-8 rounded-full cursor-pointer" width={150} height={150} />}
|
||||
buttonContent={<img src="https://i.pravatar.cc/32" alt="Profile" className="w-8 h-8 rounded-full cursor-pointer" />}
|
||||
items={dropdownItems}
|
||||
buttonClassName=""
|
||||
menuClassName="absolute right-0 mt-2 w-48 bg-white border border-gray-200 rounded shadow-lg"
|
||||
|
||||
@ -154,8 +154,8 @@ export default function DashboardPage() {
|
||||
|
||||
<div className="flex flex-wrap">
|
||||
{classes.map((classe) => (
|
||||
<div key={classe.id} className="lg:col-span-2 bg-white p-6 rounded-lg shadow-sm border border-gray-100 mr-4">
|
||||
<ClasseDetails classe={classe} />
|
||||
<div className="lg:col-span-2 bg-white p-6 rounded-lg shadow-sm border border-gray-100 mr-4">
|
||||
<ClasseDetails key={classe.id} classe={classe} />
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
|
||||
@ -239,7 +239,7 @@ const registerFormArchivedDataHandler = (data) => {
|
||||
|
||||
|
||||
fetchDataAndSetState();
|
||||
}, [reloadFetch, itemsPerPage, currentPage,activeTab, searchTerm]);
|
||||
}, [reloadFetch, currentPage]);
|
||||
|
||||
useEffect(() => {
|
||||
const fetchDataAndSetState = () => {
|
||||
@ -271,7 +271,7 @@ const timeoutId = setTimeout(() => {
|
||||
fetchDataAndSetState();
|
||||
}, 500); // Debounce la recherche
|
||||
return () => clearTimeout(timeoutId);
|
||||
}, [currentPage,itemsPerPage,searchTerm]);
|
||||
}, [searchTerm]);
|
||||
|
||||
/**
|
||||
* UseEffect to update page count of tab
|
||||
@ -284,7 +284,7 @@ useEffect(()=>{
|
||||
} else if (activeTab === 'archived') {
|
||||
setTotalPages(Math.ceil(totalArchives / itemsPerPage));
|
||||
}
|
||||
},[currentPage,activeTab,itemsPerPage,totalPending,totalSubscribed,totalArchives]);
|
||||
},[currentPage]);
|
||||
/**
|
||||
* Archives a registration form after user confirmation.
|
||||
*
|
||||
|
||||
@ -35,7 +35,7 @@ export default function Layout({
|
||||
.finally(() => {
|
||||
setIsLoading(false);
|
||||
});
|
||||
}, [setUserId, userId]);
|
||||
}, [userId]);
|
||||
|
||||
if (isLoading) {
|
||||
return <div>Loading...</div>;
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
'use client'
|
||||
import React, { useState, useRef, useEffect } from 'react';
|
||||
import { SendHorizontal } from 'lucide-react';
|
||||
import Image from 'next/image';
|
||||
|
||||
const contacts = [
|
||||
{ id: 1, name: 'Facturation', profilePic: 'https://i.pravatar.cc/32' },
|
||||
@ -62,7 +61,7 @@ export default function MessageriePage() {
|
||||
className={`p-2 cursor-pointer ${selectedContact?.id === contact.id ? 'bg-gray-200' : ''}`}
|
||||
onClick={() => setSelectedContact(contact)}
|
||||
>
|
||||
<Image src={contact.profilePic} alt={`${contact.name}'s profile`} className="w-8 h-8 rounded-full inline-block mr-2" width={150} height={150} />
|
||||
<img src={contact.profilePic} alt={`${contact.name}'s profile`} className="w-8 h-8 rounded-full inline-block mr-2" />
|
||||
{contact.name}
|
||||
</div>
|
||||
))}
|
||||
@ -76,7 +75,7 @@ export default function MessageriePage() {
|
||||
style={{ borderRadius: message.isResponse ? '20px 20px 0 20px' : '20px 20px 20px 0', minWidth: '25%' }}
|
||||
>
|
||||
<div className="flex items-center mb-1">
|
||||
<Image src={selectedContact.profilePic} alt={`${selectedContact.name}'s profile`} className="w-8 h-8 rounded-full inline-block mr-2" width={150} height={150}/>
|
||||
<img src={selectedContact.profilePic} alt={`${selectedContact.name}'s profile`} className="w-8 h-8 rounded-full inline-block mr-2" />
|
||||
<span className="text-xs text-gray-600">{selectedContact.name}</span>
|
||||
<span className="text-xs text-gray-400 ml-2">{new Date(message.date).toLocaleTimeString()}</span>
|
||||
</div>
|
||||
|
||||
@ -52,7 +52,7 @@ export default function Page() {
|
||||
console.error('Error fetching data:', error);
|
||||
});
|
||||
}
|
||||
}, [uuid]);
|
||||
}, []);
|
||||
|
||||
function validate(formData) {
|
||||
if (useFakeData) {
|
||||
|
||||
Reference in New Issue
Block a user