fix public author display
This commit is contained in:
@@ -14,6 +14,7 @@ import {
|
||||
} from 'lucide-react';
|
||||
import { useEffect, useMemo, useState } from 'react';
|
||||
|
||||
import type { PublicUserSummary } from '../../../packages/shared/src/contracts/auth';
|
||||
import { buildPublicWorkDetailUrl } from '../../routing/appPageRoutes';
|
||||
import { copyTextToClipboard } from '../../services/clipboard';
|
||||
import { ResolvedAssetImage } from '../ResolvedAssetImage';
|
||||
@@ -33,9 +34,7 @@ import {
|
||||
|
||||
export interface PlatformWorkDetailViewProps {
|
||||
entry: PlatformPublicGalleryCard;
|
||||
authorAvatarUrl?: string | null;
|
||||
authorUsername?: string | null;
|
||||
authorDisplayName?: string | null;
|
||||
authorSummary?: PublicUserSummary | null;
|
||||
isBusy: boolean;
|
||||
error?: string | null;
|
||||
visibleCoverCount?: number;
|
||||
@@ -87,9 +86,7 @@ const PLATFORM_WORK_COVER_CAROUSEL_INTERVAL_MS = 4200;
|
||||
|
||||
export function PlatformWorkDetailView({
|
||||
entry,
|
||||
authorAvatarUrl,
|
||||
authorUsername,
|
||||
authorDisplayName,
|
||||
authorSummary,
|
||||
isBusy,
|
||||
visibleCoverCount = 1,
|
||||
onBack,
|
||||
@@ -111,10 +108,10 @@ export function PlatformWorkDetailView({
|
||||
const appIconImage = coverSlides[0]?.imageSrc ?? '';
|
||||
const hasCoverCarousel = coverSlides.length > 1;
|
||||
const publicWorkCode = resolvePlatformPublicWorkCode(entry);
|
||||
const normalizedAuthorAvatarUrl = authorAvatarUrl?.trim() ?? '';
|
||||
const normalizedAuthorAvatarUrl = authorSummary?.avatarUrl?.trim() ?? '';
|
||||
const resolvedAuthorDisplayName = resolvePlatformWorkAuthorDisplayName(
|
||||
entry,
|
||||
authorUsername?.trim() || authorDisplayName?.trim() || null,
|
||||
authorSummary,
|
||||
);
|
||||
const [copyState, setCopyState] = useState<'idle' | 'copied' | 'failed'>(
|
||||
'idle',
|
||||
|
||||
Reference in New Issue
Block a user