import React from 'react' function styleForWorld(world) { return { '--world-accent': world?.theme?.accent_color || '#38bdf8', '--world-accent-secondary': world?.theme?.accent_color_secondary || '#0f172a', } } function resolvedIconName(world) { const icon = String(world?.icon_name || '').trim() if (icon) { return icon } const themeIcon = String(world?.theme?.icon_name || '').trim() return themeIcon || 'fa-solid fa-globe' } export default function WorldHero({ world, previewMode = false }) { if (!world) { return null } return (
{world.cover_url ? {world.title} : null}
{previewMode ?
Preview Mode
: null}
{world.type} {world.badge_label ? {world.badge_label} : null} {world.timeframe_label ? {world.timeframe_label} : null}

{world.title}

{world.tagline ?

{world.tagline}

: null} {world.summary ?

{world.summary}

: null} {world.description ? (
) : null}
{world.cta_url ? {world.cta_label || 'Explore'} : null} {world.public_url ? Canonical page : null}
{Array.isArray(world.related_tags) && world.related_tags.length > 0 ? (
{world.related_tags.map((tag) => ( #{tag} ))}
) : null}
) }