import React from 'react' import { usePage } from '@inertiajs/react' import SeoHead from '../../components/seo/SeoHead' export default function GroupChallengeShow() { const { props } = usePage() const group = props.group || {} const challenge = props.challenge || {} return (
{challenge.cover_url ? {challenge.title} :
}
{group.name}

{challenge.title}

{challenge.summary || challenge.description || 'Group challenge'}

{challenge.status} {challenge.visibility} {String(challenge.participation_scope || '').replace('_', ' ')} {challenge.start_at ? Starts {new Date(challenge.start_at).toLocaleDateString()} : null} {challenge.end_at ? Ends {new Date(challenge.end_at).toLocaleDateString()} : null}

Challenge brief

{challenge.description || 'No extended challenge brief yet.'}

{challenge.rules_text ? (
Rules

{challenge.rules_text}

) : null} {challenge.submission_instructions ? (
Submission instructions

{challenge.submission_instructions}

) : null}

Entries

{Array.isArray(challenge.artworks) && challenge.artworks.length > 0 ? challenge.artworks.map((artwork) => ( {artwork.thumb ? {artwork.title} : null}
{artwork.title}
)) :

No entries linked yet.

}
) }