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 { Input } from '@/components/ui/input'; import { Textarea } from '@/components/ui/textarea'; import { Skeleton } from '@/components/ui/skeleton'; import { ArrowLeft, MessageSquare, MessageCircle, ArrowUp, ArrowDown, Clock, RefreshCw } from 'lucide-react'; import { formatDistanceToNow } from 'date-fns'; import { CypherImage } from './ui/CypherImage'; const PostList = () => { const { cellId } = useParams<{ cellId: string }>(); const { getCellById, getPostsByCell, getCommentsByPost, createPost, isInitialLoading, isPostingPost, isRefreshing, refreshData } = useForum(); const { isAuthenticated } = useAuth(); const [newPostTitle, setNewPostTitle] = useState(''); const [newPostContent, setNewPostContent] = useState(''); if (!cellId || isInitialLoading) { 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}