Lint frontend (#131)

* Add lint-fix npm target

* Sync eslint+plugins with backend

* Add prettier

* Ignore no-explicit-any lint rule for now

* Silence eslint react warning

* Format frontend via prettier

* Lint frontend.

---------

Co-authored-by: antanst <>
This commit is contained in:
Antonis Anastasiadis 2025-07-09 12:23:55 +03:00 committed by GitHub
parent f433dbffe3
commit 220bc92b4a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
114 changed files with 30271 additions and 48239 deletions

View file

@ -1,47 +1,51 @@
import React from 'react';
import { ChevronDownIcon, ChevronRightIcon } from "@heroicons/react/24/outline";
import { ChevronDownIcon, ChevronRightIcon } from '@heroicons/react/24/outline';
interface CollapsibleSectionProps {
title: string;
isExpanded: boolean;
onToggle: () => void;
children: React.ReactNode;
className?: string;
title: string;
isExpanded: boolean;
onToggle: () => void;
children: React.ReactNode;
className?: string;
}
const CollapsibleSection: React.FC<CollapsibleSectionProps> = ({
title,
isExpanded,
onToggle,
children,
className = ""
title,
isExpanded,
onToggle,
children,
className = '',
}) => {
return (
<div className={`border-b border-gray-200 dark:border-gray-700 ${className}`}>
<button
type="button"
onClick={onToggle}
className="w-full px-4 py-3 flex items-center justify-between text-left hover:bg-gray-50 dark:hover:bg-gray-800 transition-colors"
>
<span className="text-sm font-medium text-gray-900 dark:text-gray-100">
{title}
</span>
{isExpanded ? (
<ChevronDownIcon className="h-4 w-4 text-gray-500" />
) : (
<ChevronRightIcon className="h-4 w-4 text-gray-500" />
)}
</button>
<div className={`transition-all duration-300 ease-in-out ${
isExpanded ? 'max-h-[500px] opacity-100' : 'max-h-0 opacity-0 overflow-hidden'
}`}>
<div className="px-4 pb-4">
{children}
return (
<div
className={`border-b border-gray-200 dark:border-gray-700 ${className}`}
>
<button
type="button"
onClick={onToggle}
className="w-full px-4 py-3 flex items-center justify-between text-left hover:bg-gray-50 dark:hover:bg-gray-800 transition-colors"
>
<span className="text-sm font-medium text-gray-900 dark:text-gray-100">
{title}
</span>
{isExpanded ? (
<ChevronDownIcon className="h-4 w-4 text-gray-500" />
) : (
<ChevronRightIcon className="h-4 w-4 text-gray-500" />
)}
</button>
<div
className={`transition-all duration-300 ease-in-out ${
isExpanded
? 'max-h-[500px] opacity-100'
: 'max-h-0 opacity-0 overflow-hidden'
}`}
>
<div className="px-4 pb-4">{children}</div>
</div>
</div>
</div>
</div>
);
);
};
export default CollapsibleSection;
export default CollapsibleSection;