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:
parent
0f8c77908b
commit
ff5cd8f6eb
1 changed files with 2 additions and 2 deletions
|
|
@ -17,7 +17,7 @@ import { useNostrPublish } from '@/hooks/useNostrPublish';
|
||||||
import { useListingReports } from '@/hooks/useListingReports';
|
import { useListingReports } from '@/hooks/useListingReports';
|
||||||
import { useSellerInfo } from '@/hooks/useSellerInfo';
|
import { useSellerInfo } from '@/hooks/useSellerInfo';
|
||||||
import { useVenuesWithPasses } from '@/hooks/useRiderCard';
|
import { useVenuesWithPasses } from '@/hooks/useRiderCard';
|
||||||
import { useTrustScore } from '@/hooks/useTrustScore';
|
import { useTrustBucket } from '@/hooks/useTrustBucket';
|
||||||
import { useMarkListingSold } from '@/hooks/useMarkListingSold';
|
import { useMarkListingSold } from '@/hooks/useMarkListingSold';
|
||||||
import { MarkSoldDialog } from '@/components/MarkSoldDialog';
|
import { MarkSoldDialog } from '@/components/MarkSoldDialog';
|
||||||
import { ListingTradeActions } from '@/components/ListingTradeActions';
|
import { ListingTradeActions } from '@/components/ListingTradeActions';
|
||||||
|
|
@ -64,7 +64,7 @@ export function MarketplaceItemCard({ item, compact = false }: MarketplaceItemCa
|
||||||
const sellerIssuesPasses = !!passIndex?.owners.has(item.pubkey);
|
const sellerIssuesPasses = !!passIndex?.owners.has(item.pubkey);
|
||||||
|
|
||||||
// Fetch trust score
|
// Fetch trust score
|
||||||
const { data: trustScore } = useTrustScore(item.pubkey);
|
const { localScore: trustScore } = useTrustBucket(item.pubkey);
|
||||||
|
|
||||||
const [showReportDialog, setShowReportDialog] = useState(false);
|
const [showReportDialog, setShowReportDialog] = useState(false);
|
||||||
const [showDeleteDialog, setShowDeleteDialog] = useState(false);
|
const [showDeleteDialog, setShowDeleteDialog] = useState(false);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue