perf(market): drop the duplicate per-card trust query

MarketplaceItemCard ran useTrustScore(item.pubkey) AND rendered
TrustBadge for the same author. It only needed the >=60 bit, which the
shared viewer graph (via useTrustBucket.localScore) already provides, so
the extra heavy per-card query is gone. Behaviour preserved.
This commit is contained in:
SkateSpots 2026-10-09 18:09:48 +07:00
parent 0f8c77908b
commit ff5cd8f6eb

View file

@ -17,7 +17,7 @@ import { useNostrPublish } from '@/hooks/useNostrPublish';
import { useListingReports } from '@/hooks/useListingReports';
import { useSellerInfo } from '@/hooks/useSellerInfo';
import { useVenuesWithPasses } from '@/hooks/useRiderCard';
import { useTrustScore } from '@/hooks/useTrustScore';
import { useTrustBucket } from '@/hooks/useTrustBucket';
import { useMarkListingSold } from '@/hooks/useMarkListingSold';
import { MarkSoldDialog } from '@/components/MarkSoldDialog';
import { ListingTradeActions } from '@/components/ListingTradeActions';
@ -64,7 +64,7 @@ export function MarketplaceItemCard({ item, compact = false }: MarketplaceItemCa
const sellerIssuesPasses = !!passIndex?.owners.has(item.pubkey);
// Fetch trust score
const { data: trustScore } = useTrustScore(item.pubkey);
const { localScore: trustScore } = useTrustBucket(item.pubkey);
const [showReportDialog, setShowReportDialog] = useState(false);
const [showDeleteDialog, setShowDeleteDialog] = useState(false);