Dashboard: show 10 chapters titled Chapters; bump chapter mtime on beat changes
Beat create/update/delete/reorder/assign/move now touch the parent chapter's UpdatedAt so the dashboard's recency sort reflects beat edits, not just chapter-level prose/tag changes.
This commit is contained in:
@@ -5,6 +5,7 @@ import { useAuth } from '../auth/AuthContext'
|
||||
import { AutoField, EmptyState, ErrorNote, Spinner, StatusBadge } from '../components/ui'
|
||||
|
||||
const RECENT_COUNT = 5
|
||||
const RECENT_CHAPTERS_COUNT = 10
|
||||
|
||||
export default function DashboardPage() {
|
||||
const { projectId = '' } = useParams()
|
||||
@@ -61,7 +62,7 @@ function OutliningDashboard({ projectId }: { projectId: string }) {
|
||||
<div className="grid gap-6 lg:grid-cols-3">
|
||||
<section className="card p-5 lg:col-span-2">
|
||||
<div className="mb-4 flex items-center justify-between gap-4">
|
||||
<h2 className="text-lg font-semibold">Outline</h2>
|
||||
<h2 className="text-lg font-semibold">Chapters</h2>
|
||||
<Link to="chapters" className="text-sm muted hover:underline">
|
||||
View all →
|
||||
</Link>
|
||||
@@ -74,7 +75,7 @@ function OutliningDashboard({ projectId }: { projectId: string }) {
|
||||
<EmptyState title="No chapters yet" hint="Add the first chapter to start outlining." />
|
||||
) : (
|
||||
<ul className="grid grid-cols-1 gap-2">
|
||||
{recentChapters.slice(0, RECENT_COUNT).map((chapter) => (
|
||||
{recentChapters.slice(0, RECENT_CHAPTERS_COUNT).map((chapter) => (
|
||||
<li key={chapter.id}>
|
||||
<Link
|
||||
to={`chapters/${chapter.id}`}
|
||||
|
||||
Reference in New Issue
Block a user