{item.title}
{item.excerpt || 'Add an excerpt to make this prompt easier to scan in moderation.'}
{item.tags?.length ? (Updated
{formatDateLabel(item.updated_at)}
Access
{item.access_level || 'free'}
Status
{item.active ? 'Visible' : 'Hidden'}
import React, { useEffect, useState } from 'react' import { Head, Link, router, usePage } from '@inertiajs/react' import AdminLayout from '../../../Layouts/AdminLayout' const PROMPT_VIEW_STORAGE_KEY = 'skinbase.admin.academy.prompts.view' const PROMPT_VIEW_OPTIONS = [ { value: 'gallery', label: 'Gallery', icon: 'fa-images' }, { value: 'grid', label: 'Grid', icon: 'fa-grid-2' }, { value: 'table', label: 'Table', icon: 'fa-table-list' }, ] function formatDateLabel(value) { if (!value) return 'Recently updated' const date = new Date(value) if (Number.isNaN(date.getTime())) return 'Recently updated' return new Intl.DateTimeFormat('en-GB', { day: 'numeric', month: 'short', year: 'numeric' }).format(date) } function paginationLabel(label) { return String(label || '') .replace(/«/g, 'Previous') .replace(/»/g, 'Next') .replace(/<[^>]+>/g, '') .trim() } function promptSummary(items = []) { return items.reduce((summary, item) => ({ total: summary.total + 1, active: summary.active + (item.active ? 1 : 0), featured: summary.featured + (item.featured ? 1 : 0), promptOfWeek: summary.promptOfWeek + (item.prompt_of_week ? 1 : 0), comparisons: summary.comparisons + Number(item.comparisons_count || 0), }), { total: 0, active: 0, featured: 0, promptOfWeek: 0, comparisons: 0 }) } function PromptFlag({ children, tone = 'default' }) { const toneClass = tone === 'warm' ? 'border-[#ffcfbf]/20 bg-[#ffcfbf]/10 text-[#fff0ea]' : tone === 'sky' ? 'border-sky-300/20 bg-sky-300/10 text-sky-100' : tone === 'emerald' ? 'border-emerald-300/20 bg-emerald-300/10 text-emerald-100' : 'border-white/10 bg-white/[0.05] text-slate-200' return {children} } function PromptActions({ item }) { return (
Prompt preview
No image attached yet
{item.excerpt || 'Add an excerpt to make this prompt easier to scan in moderation.'}
{item.tags?.length ? (Updated
{formatDateLabel(item.updated_at)}
Access
{item.access_level || 'free'}
Status
{item.active ? 'Visible' : 'Hidden'}
{item.excerpt || 'No excerpt added yet.'}
| Prompt | Category | Access | Signals | Updated | Actions |
|---|---|---|---|---|---|
|
{item.title} {item.excerpt || 'No excerpt added yet.'} |
{item.category_name || 'Uncategorized'} | {item.access_level || 'free'} |
{item.comparisons_count || 0} comparisons {item.difficulty || 'No difficulty'} {item.active ? 'Active' : 'Draft'} |
{formatDateLabel(item.updated_at)} |
{item.preview_url ? Preview : null}
Edit
|
Prompt preview wall
Preview images will appear here as prompts get covers.
{subtitle} Review prompts in a visual-first moderation surface, jump into edits quickly, and switch between gallery, grid, or table depending on the task in front of you.
Visual-first
Curate covers and prompt outputs before opening the form.
Workflow-ready
Switch between gallery, compact cards, and scan-heavy tables.
Comparison-aware
Spot prompts with provider notes and attached result references.
Active
{summary.active}
Featured
{summary.featured}
Prompt of week
{summary.promptOfWeek}
Comparisons
{summary.comparisons}
Manage Academy content below. Changes clear Academy cache automatically.
Manage Academy content below. Changes clear Academy cache automatically.
Create record{column.replaceAll('_', ' ')}
{String(item[column] ?? '')}