import React from 'react' import { Head, useForm } from '@inertiajs/react' import SeoHead from '../../components/seo/SeoHead' import NovaSelect from '../../components/ui/NovaSelect' export default function AcademyChallengeSubmit({ seo, challenge, artworks, submitUrl }) { const form = useForm({ artwork_id: artworks[0]?.id || '', prompt_used: '', workflow_notes: '', ai_tool_used: '', is_ai_generated: false, is_ai_assisted: true, }) const artworkOptions = artworks.map((artwork) => ({ value: artwork.id, label: artwork.title })) return (

Academy challenge

Submit to {challenge.title}

Attach one of your public artworks and optionally include the prompt or workflow notes used to create it.

{ event.preventDefault(); form.post(submitUrl) }} className="space-y-5 rounded-[30px] border border-white/10 bg-white/[0.04] p-6">
form.setData('artwork_id', nextValue || '')} options={artworkOptions} placeholder="Select artwork" className="mt-2 rounded-2xl bg-black/20" /> {form.errors.artwork_id ?

{form.errors.artwork_id}

: null}