mirror of
https://github.com/hoornet/vega.git
synced 2026-05-10 06:09:12 -07:00
Fix read-only mode: hide write actions when no signer
- ComposeBox, action row (reply/like/zap), and write article button all gated on getNDK().signer in addition to loggedIn - Prevents read-only (npub-only) users from seeing actions they can't use - Found during browser testing of the login path Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -5,7 +5,7 @@ import { useReactionCount } from "../../hooks/useReactionCount";
|
||||
import { useUserStore } from "../../stores/user";
|
||||
import { useUIStore } from "../../stores/ui";
|
||||
import { timeAgo, shortenPubkey } from "../../lib/utils";
|
||||
import { publishReaction, publishReply } from "../../lib/nostr";
|
||||
import { publishReaction, publishReply, getNDK } from "../../lib/nostr";
|
||||
import { NoteContent } from "./NoteContent";
|
||||
import { ZapModal } from "../zap/ZapModal";
|
||||
|
||||
@@ -122,7 +122,7 @@ export function NoteCard({ event }: NoteCardProps) {
|
||||
</div>
|
||||
|
||||
{/* Actions */}
|
||||
{loggedIn && (
|
||||
{loggedIn && !!getNDK().signer && (
|
||||
<div className="flex items-center gap-4 mt-2">
|
||||
<button
|
||||
onClick={handleReply}
|
||||
|
||||
Reference in New Issue
Block a user