import React from 'react' import { router, usePage } from '@inertiajs/react' import StudioLayout from '../../Layouts/StudioLayout' import WorldStatusBadge from '../../components/worlds/WorldStatusBadge' import WorldAnalyticsPortfolioPanel from '../../components/worlds/editor/analytics/WorldAnalyticsPortfolioPanel' import NovaSelect from '../../components/ui/NovaSelect' export default function StudioWorldsIndex() { const { props } = usePage() const listing = props.listing || {} const items = Array.isArray(listing.items) ? listing.items : [] const filters = listing.filters || {} const updateFilter = (name, value) => { router.get('/studio/worlds', { ...filters, [name]: value }, { preserveState: true, replace: true }) } return (
Status updateFilter('status', val)} options={[{ value: '', label: 'All statuses' }, ...(props.statusOptions || [])]} searchable={false} />
Type updateFilter('type', val)} options={[{ value: '', label: 'All types' }, ...(props.typeOptions || [])]} searchable={false} />
New world
{items.length > 0 ? items.map((world) => (
{(Array.isArray(world.status_badges) ? world.status_badges : []).map((badge) => )}

{world.title}

/{world.slug}
{world.summary ?

{world.summary}

: null}
{world.timeframe_label ? {world.timeframe_label} : null} {world.promotion_window_label ? {world.promotion_window_label} : null} {world.relation_count} relations {world.live_submission_count > 0 ? {world.live_submission_count} live submissions : null} {world.theme_key ? {world.theme_key} : null}
Edit Preview {world.public_url ? Public : null}
)) : (
No worlds match this filter yet.
)}
) }