Move "How We Verify" statement from Overview to the Verified tab
This commit is contained in:
@@ -31,7 +31,6 @@ import { Nip05Badge } from '@/components/Nip05Badge';
|
||||
import { PledgeCard } from '@/components/PledgeCard';
|
||||
import { ProfileReactionButton } from '@/components/ProfileReactionButton';
|
||||
import { OrganizationsAllDialog } from '@/components/profile/OrganizationsAllDialog';
|
||||
import { ProfileVerifierSection } from '@/components/profile/ProfileVerifierSection';
|
||||
import { useCampaignModeration } from '@/hooks/useCampaignModeration';
|
||||
import { useProfileOrganizations, type ProfileOrganization } from '@/hooks/useProfileOrganizations';
|
||||
import type { ProfileCampaignStats } from '@/hooks/useProfileCampaignStats';
|
||||
@@ -390,11 +389,6 @@ export function ProfileOverviewSections({
|
||||
const { t } = useTranslation();
|
||||
return (
|
||||
<div className={cn('flex flex-col gap-5', className)}>
|
||||
{/* Verifier statement (kind 14672) — surfaced first so donors can
|
||||
immediately see how this account verifies campaigns. Renders
|
||||
nothing when the profile has not published a statement. */}
|
||||
<ProfileVerifierSection pubkey={pubkey} />
|
||||
|
||||
{/* Profile fields (rendered upstream) — placed first so the
|
||||
profile's own freeform metadata (links, addresses, etc.) is
|
||||
the first thing visitors read, ahead of campaigns/orgs. */}
|
||||
|
||||
@@ -2,6 +2,7 @@ import { useTranslation } from 'react-i18next';
|
||||
import { BadgeCheck } from 'lucide-react';
|
||||
|
||||
import { CampaignCard, CampaignCardSkeleton } from '@/components/CampaignCard';
|
||||
import { ProfileVerifierSection } from '@/components/profile/ProfileVerifierSection';
|
||||
import { Card } from '@/components/ui/card';
|
||||
import { useVerifiedCampaigns } from '@/hooks/useVerifiedCampaigns';
|
||||
|
||||
@@ -11,10 +12,13 @@ interface ProfileVerifiedTabProps {
|
||||
}
|
||||
|
||||
/**
|
||||
* Grid of campaigns this profile has verified — resolved from the
|
||||
* account's own `agora.verified` (kind 1985) labels via
|
||||
* {@link useVerifiedCampaigns}. Surfaced as the default tab for verifier
|
||||
* profiles so visitors immediately see what the organization stands behind.
|
||||
* The profile's verification tab: the account's self-published
|
||||
* "How We Verify" statement (kind 14672) followed by the grid of
|
||||
* campaigns it has verified — resolved from the account's own
|
||||
* `agora.verified` (kind 1985) labels via {@link useVerifiedCampaigns}.
|
||||
* Surfaced as the default tab for verifier profiles so visitors
|
||||
* immediately see how the organization vets campaigns and what it
|
||||
* stands behind.
|
||||
*/
|
||||
export function ProfileVerifiedTab({ pubkey, displayName }: ProfileVerifiedTabProps) {
|
||||
const { t } = useTranslation();
|
||||
@@ -22,7 +26,8 @@ export function ProfileVerifiedTab({ pubkey, displayName }: ProfileVerifiedTabPr
|
||||
|
||||
if (isLoading && campaigns.length === 0) {
|
||||
return (
|
||||
<div className="px-4 sm:px-6 py-6">
|
||||
<div className="px-4 sm:px-6 py-6 space-y-6">
|
||||
<ProfileVerifierSection pubkey={pubkey} />
|
||||
<div className="grid grid-cols-1 sm:grid-cols-2 xl:grid-cols-3 gap-4 sm:gap-5">
|
||||
{Array.from({ length: 3 }).map((_, i) => (
|
||||
<CampaignCardSkeleton key={i} />
|
||||
@@ -34,7 +39,8 @@ export function ProfileVerifiedTab({ pubkey, displayName }: ProfileVerifiedTabPr
|
||||
|
||||
if (campaigns.length === 0) {
|
||||
return (
|
||||
<div className="px-4 sm:px-6 py-12" data-pubkey={pubkey}>
|
||||
<div className="px-4 sm:px-6 py-6 space-y-6" data-pubkey={pubkey}>
|
||||
<ProfileVerifierSection pubkey={pubkey} />
|
||||
<Card className="border-dashed">
|
||||
<div className="py-12 px-8 text-center">
|
||||
<BadgeCheck className="size-10 mx-auto mb-3 text-muted-foreground" />
|
||||
@@ -49,6 +55,7 @@ export function ProfileVerifiedTab({ pubkey, displayName }: ProfileVerifiedTabPr
|
||||
|
||||
return (
|
||||
<div className="px-4 sm:px-6 py-6 space-y-4">
|
||||
<ProfileVerifierSection pubkey={pubkey} className="mb-2" />
|
||||
<p className="text-sm text-muted-foreground">
|
||||
{t('profile.verified.count', { count: campaigns.length })}
|
||||
</p>
|
||||
|
||||
Reference in New Issue
Block a user