import React, { useState } from 'react'; import { Link, useParams } from 'react-router-dom'; import { useForum } from '@/contexts/ForumContext'; import { useAuth } from '@/contexts/AuthContext'; import { Button } from '@/components/ui/button'; import { Textarea } from '@/components/ui/textarea'; import { Skeleton } from '@/components/ui/skeleton'; import { ArrowLeft, MessageSquare, MessageCircle, ArrowUp, ArrowDown, Clock } from 'lucide-react'; import { formatDistanceToNow } from 'date-fns'; const PostList = () => { const { cellId } = useParams<{ cellId: string }>(); const { getCellById, getPostsByCell, createPost, loading } = useForum(); const { isAuthenticated } = useAuth(); const [newPostContent, setNewPostContent] = useState(''); const [isSubmitting, setIsSubmitting] = useState(false); if (!cellId || loading) { return (
The cell you're looking for doesn't exist.
{cell.description}
{isAuthenticated ? "Be the first to post in this cell!" : "Connect your wallet and verify Ordinal ownership to start a thread."}
{post.content}