import { useEffect } from 'react'; import { useSelector, useDispatch } from 'react-redux'; import { fetchBrands } from '../store/slices/brandsSlice'; import { Card } from 'react-bootstrap'; import { Folders, Hash, Link, Users } from 'lucide-react'; export default function BrandsList({ openBrandDetail }) { const brands = useSelector((state) => state.brands.brands); const dispatch = useDispatch(); useEffect(() => { dispatch(fetchBrands()); }, [dispatch]); return (
{brands?.length > 0 && brands.map((brand) => (
openBrandDetail(brand)}> {brand.name.slice(0, 1)} {brand.name.toUpperCase()} Category {brand.category} Collab. {brand.collab_count} Creators {brand.creators_count} Source {brand.source}
))}
); }