mirror of
https://github.com/hoornet/vega.git
synced 2026-05-11 14:41:18 -07:00
Add thread view with replies
- Click note content to open thread view - ThreadView shows root note, reply composer, and replies - fetchReplies added to nostr lib (kind 1 #e filter) - UI store gains openThread, goBack, previousView for navigation history - Profile back button now returns to previous view correctly Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -19,7 +19,7 @@ export function NoteCard({ event }: NoteCardProps) {
|
||||
const time = event.created_at ? timeAgo(event.created_at) : "";
|
||||
|
||||
const { loggedIn } = useUserStore();
|
||||
const { openProfile } = useUIStore();
|
||||
const { openProfile, openThread, currentView } = useUIStore();
|
||||
const likedKey = "wrystr_liked";
|
||||
const getLiked = () => {
|
||||
try { return new Set<string>(JSON.parse(localStorage.getItem(likedKey) || "[]")); }
|
||||
@@ -109,7 +109,12 @@ export function NoteCard({ event }: NoteCardProps) {
|
||||
<span className="text-text-dim text-[11px] shrink-0">{time}</span>
|
||||
</div>
|
||||
|
||||
<NoteContent content={event.content} />
|
||||
<div
|
||||
className="cursor-pointer"
|
||||
onClick={() => openThread(event, currentView as "feed" | "profile")}
|
||||
>
|
||||
<NoteContent content={event.content} />
|
||||
</div>
|
||||
|
||||
{/* Actions */}
|
||||
{loggedIn && (
|
||||
|
||||
Reference in New Issue
Block a user