mirror of
https://github.com/hoornet/vega.git
synced 2026-07-31 12:03:07 -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:
@@ -2,6 +2,7 @@ import { useState } from "react";
|
||||
import { useUIStore } from "../../stores/ui";
|
||||
import { useFeedStore } from "../../stores/feed";
|
||||
import { useUserStore } from "../../stores/user";
|
||||
import { getNDK } from "../../lib/nostr";
|
||||
import { LoginModal } from "../shared/LoginModal";
|
||||
import { shortenPubkey } from "../../lib/utils";
|
||||
|
||||
@@ -44,7 +45,7 @@ export function Sidebar() {
|
||||
|
||||
{/* Nav */}
|
||||
<nav className="flex-1 overflow-y-auto py-2">
|
||||
{loggedIn && !sidebarCollapsed && (
|
||||
{loggedIn && !!getNDK().signer && !sidebarCollapsed && (
|
||||
<button
|
||||
onClick={() => setView("article-editor")}
|
||||
className={`w-full text-left px-3 py-1.5 flex items-center gap-2 text-[12px] transition-colors mb-1 ${
|
||||
|
||||
Reference in New Issue
Block a user