feat: CRUD admin for skills and teams

This commit is contained in:
Julien Froidefond
2025-08-22 08:56:02 +02:00
parent 514b33870b
commit e314a96fae
43 changed files with 2516 additions and 179 deletions

View File

@@ -0,0 +1,38 @@
"use client";
import { Card, CardContent } from "@/components/ui/card";
interface TreeViewContainerProps {
children: React.ReactNode;
isLoading?: boolean;
loadingMessage?: string;
emptyState?: React.ReactNode;
hasContent?: boolean;
}
export function TreeViewContainer({
children,
isLoading = false,
loadingMessage = "Chargement...",
emptyState,
hasContent = true,
}: TreeViewContainerProps) {
if (isLoading) {
return (
<div className="text-center py-8">
<div className="animate-spin rounded-full h-6 w-6 border-b-2 border-blue-400 mx-auto mb-3"></div>
<p className="text-slate-400 text-sm">{loadingMessage}</p>
</div>
);
}
if (!hasContent && emptyState) {
return emptyState;
}
return (
<Card className="bg-white/5 border-white/10">
<CardContent className="p-0">{children}</CardContent>
</Card>
);
}