This repository has been archived on 2026-11-17. You can view files and clone it, but cannot push or open issues or pull requests.
caelum0x 46bf9b83bf feat: round-5 external harvest (22 features ported from external/ into 5 products)
Harvest valuable features from external/ reference repos, adapted to each
product's stack and wired in; all products typecheck clean.

- gitgram-web (5): clickable @mention/#hashtag linkify in rendered content
  (munia), + feed/notification/accessibility patterns; install @testing-library/dom
- gitgram-backend (3): feed thread dedup + muted-thread removal (bluesky),
  GitHub star/follow write-back via OAuth (gh-social)
- gitgram-mobile (4): double-tap-to-like + heart bounce (proximity), haptics layer
  (bluesky useHaptics), + gesture/feed UX
- aitm-api (4): beads ready/dependency-DAG endpoints + atomic claim (beads)
- aitm-mcp (6): beads_ready work-queue tool, context-efficient projections,
  transport arg aliasing (context7/pal-mcp/beads)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-28 18:48:46 +03:00

34 lines
1.1 KiB
TypeScript

'use client'
import { useEffect, useState } from 'react'
import { useParams, useRouter } from 'next/navigation'
import { useAuthStore } from '@/store/authStore'
import { postService } from '@/services/postService'
import PostCard from '@/components/PostCard'
import MuteThreadButton from '@/components/MuteThreadButton'
export default function PostDetailPage() {
const params = useParams()
const router = useRouter()
const { isAuthenticated } = useAuthStore()
const [post, setPost] = useState<any>(null)
useEffect(() => {
if (!isAuthenticated) { router.push('/login'); return }
postService.getPost(params.id as string).then(setPost).catch(() => router.push('/feed'))
}, [isAuthenticated, params.id])
if (!isAuthenticated || !post) return null
return (
<div className="max-w-4xl mx-auto py-8 px-4">
<PostCard
post={post}
onLike={(id: string) => { postService.likePost(id).then(() => setPost({...post, isLiked: true, likesCount: post.likesCount + 1})) }}
/>
<div className="mt-3 flex justify-end">
<MuteThreadButton postId={params.id as string} />
</div>
</div>
)
}