import { useHasUserPermission } from "../../hooks/useHasUserPermission"; import { useProfile } from "../../hooks/useProfile"; import { DIRECTORY_ADMIN, DIRECTORY_MANAGER } from "../../utils/constants"; const BucketList = ({ buckets, loading, searchTerm, onEdit, onDelete }) => { const { profile } = useProfile(); const IsDirecrory_Admin = useHasUserPermission(DIRECTORY_ADMIN); const IsDirectory_Manager = useHasUserPermission(DIRECTORY_MANAGER); const sorted = buckets.filter((bucket) => bucket.name.toLowerCase().includes(searchTerm.toLowerCase()) ); if (loading) return
{bucket.description || "No description"}