import React from 'react' import { router, usePage } from '@inertiajs/react' import StudioLayout from '../../Layouts/StudioLayout' import { studioSurface, trackStudioEvent } from '../../utils/studioEvents' function formatDate(value) { if (!value) return 'Unknown' const date = new Date(value) if (Number.isNaN(date.getTime())) return 'Unknown' return date.toLocaleDateString(undefined, { month: 'short', day: 'numeric', year: 'numeric' }) } export default function StudioAssets() { const { props } = usePage() const assets = props.assets || {} const items = assets.items || [] const summary = assets.summary || [] const highlights = assets.highlights || {} const filters = assets.filters || {} const meta = assets.meta || {} const typeOptions = assets.type_options || [] const sourceOptions = assets.source_options || [] const sortOptions = assets.sort_options || [] const trackReuse = (asset, destination) => { trackStudioEvent('studio_asset_reused', { surface: studioSurface(), module: 'assets', item_module: asset.source_key || 'assets', item_id: asset.numeric_id, meta: { asset_id: asset.id, asset_type: asset.type, destination, }, }) } const updateFilters = (patch) => { const next = { ...filters, ...patch, } if (patch.page == null) { next.page = 1 } trackStudioEvent('studio_filter_used', { surface: studioSurface(), module: 'assets', meta: patch, }) router.get(window.location.pathname, next, { preserveScroll: true, preserveState: true, replace: true, }) } return (
Library volume
{Number(meta.total || 0).toLocaleString()}
creator assets available
{summary.map((item) => ( ))}

Showing {items.length} of {Number(meta.total || 0).toLocaleString()} assets

{items.length > 0 ? (
{items.map((asset) => (
{asset.image_url ? ( {asset.title} ) : (
)}
{asset.type_label}

{asset.source_label}

{asset.title}

{asset.description}

Used {Number(asset.usage_count || 0).toLocaleString()} times Updated {formatDate(asset.created_at)}
{(asset.usage_references || []).length > 0 ? (
{(asset.usage_references || []).slice(0, 2).map((reference) => ( {reference.label} ))}
) : null}
))}
) : (

No assets match this view

Try another asset type or a broader search term. This library includes card backgrounds, story covers, collection covers, artwork previews, and profile branding.

)}
Page {meta.current_page || 1} of {meta.last_page || 1}
) }