import React from 'react'; import { Link } from 'react-router-dom'; import { useForum } from '@/contexts/ForumContext'; import { Skeleton } from '@/components/ui/skeleton'; import { Layout, MessageSquare } from 'lucide-react'; import { CreateCellDialog } from './CreateCellDialog'; const CellList = () => { const { cells, loading, posts } = useForum(); if (loading) { return (

Loading Cells...

{[...Array(4)].map((_, i) => (
))}
); } const getPostCount = (cellId: string) => { return posts.filter(post => post.cellId === cellId).length; }; return (

Cells

{cells.map((cell) => (
{cell.name}

{cell.name}

{cell.description}

{getPostCount(cell.id)} threads
))}
); }; export default CellList;