import React from 'react'
import { usePage } from '@inertiajs/react'
import ArtworkGallery from '../../components/artwork/ArtworkGallery'
import CollectionCard from '../../components/profile/collections/CollectionCard'
import CollectionVisibilityBadge from '../../components/profile/collections/CollectionVisibilityBadge'
import SeoHead from '../../components/seo/SeoHead'
import CommentForm from '../../components/social/CommentForm'
import CommentList from '../../components/social/CommentList'
import useWebShare from '../../hooks/useWebShare'
function getCsrfToken() {
if (typeof document === 'undefined') return ''
return document.querySelector('meta[name="csrf-token"]')?.getAttribute('content') || ''
}
async function requestJson(url, { method = 'POST', body } = {}) {
const response = await fetch(url, {
method,
credentials: 'same-origin',
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
'X-CSRF-TOKEN': getCsrfToken(),
'X-Requested-With': 'XMLHttpRequest',
},
body: body ? JSON.stringify(body) : undefined,
})
const payload = await response.json().catch(() => ({}))
if (!response.ok) {
throw new Error(payload?.message || 'Request failed.')
}
return payload
}
function TypeBadge({ collection }) {
const label = collection?.type === 'editorial'
? 'Editorial'
: collection?.type === 'community'
? 'Community'
: 'Personal'
return {label}
}
function CollaboratorCard({ member }) {
return (
Submitted by @{submission?.user?.username}
{submission?.message ?{submission.message}
: null}{isOwner ? (smart ? 'Adjust the smart rules to broaden the match or publish more artworks that fit this set.' : 'Add artworks to start building the visual rhythm, cover image, and sequence for this showcase.') : (smart ? 'This smart collection does not have visible matches right now.' : 'There are no visible artworks in this collection right now.')}
{eyebrow}
{item.subtitle}
: null} {item?.relationship_type ?{item.relationship_type}
: null}{item.description}
: null} ) } function CollectionCover({ collection }) { const coverImage = collection?.cover_image const coverMaturity = collection?.cover_image_maturity || null const shouldBlur = Boolean(coverMaturity?.should_blur) const isMature = Boolean(coverMaturity?.is_mature_effective) if (!coverImage) { return{item.subtitle}
: null}{item.description}
: null} > ) if (item.url) { return {body} } returnStart with the standout pieces from this collection before diving into the full sequence.
This collection is curated by a single owner right now.
}Sign in with at least one artwork on your account to submit here.
)}No submissions yet.
}{collection.subtitle}
: null} {collection?.description ?{collection.description}
:A curated selection from @{owner?.username}, assembled as a focused gallery rather than a simple archive.
} {collection?.smart_summary ?{collection.smart_summary}
: null} {featuringCreatorsCount > 1 ?Featuring artworks by {featuringCreatorsCount} creators.
: null} > ) : null}{state.notice}
: null}Series
{seriesContext.description}
: null}Related Context
Stories
Browse The Theme
Connected Creators