import { notFound } from 'next/navigation'
import { Suspense } from 'react'
import { Badge } from 'ui'
import { Conversation } from '~/components/Contribute/Conversation'
import { HelpOnPlatformButton } from '~/components/Contribute/HelpOnPlatformButton'
import { getThreadById } from '~/data/contribute'
import Loading from '../../app/contribute/t/[id]/loading'
export async function ThreadContent({ id }: { id: string }) {
const thread = await getThreadById(id)
if (!thread) {
notFound()
}
return (
{/* Conversation Section (includes title, question, and first reply) */}
}>
{/* Metadata and Actions Section */}
{thread.product_areas.filter((area: string) => area !== 'Other').length > 0 && (
Product areas
{thread.product_areas
.filter((area: string) => area !== 'Other')
.map((area: string) => (
{area}
))}
)}
{thread.stack.filter((tech: string) => tech !== 'Other').length > 0 && (
Stack
{thread.stack
.filter((tech: string) => tech !== 'Other')
.map((tech: string) => (
{tech}
))}
)}
{/* CTA Button */}
)
}