feat: add PageHeader component and centralize page spacing
All checks were successful
Deploy with Docker Compose / deploy (push) Successful in 3m1s
All checks were successful
Deploy with Docker Compose / deploy (push) Successful in 3m1s
- Create reusable PageHeader component (emoji + title + subtitle + actions) - Use PageHeader in sessions, teams, users, objectives pages - Centralize vertical padding in layout (py-6) and remove per-page py-* values Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -24,7 +24,7 @@ import {
|
||||
getGifMoodSessionsByUserId,
|
||||
getTeamCollaboratorSessionsForAdmin as getTeamGifMoodSessions,
|
||||
} from '@/services/gif-mood';
|
||||
import { Card } from '@/components/ui';
|
||||
import { Card, PageHeader } from '@/components/ui';
|
||||
import { withWorkshopType } from '@/lib/workshops';
|
||||
import { WorkshopTabs } from './WorkshopTabs';
|
||||
import { NewWorkshopDropdown } from './NewWorkshopDropdown';
|
||||
@@ -113,22 +113,17 @@ export default async function SessionsPage() {
|
||||
const totalCount = allSessions.length;
|
||||
|
||||
return (
|
||||
<main className="mx-auto max-w-7xl px-4 py-8 sm:py-12">
|
||||
{/* Header */}
|
||||
<div className="mb-10 flex flex-col sm:flex-row sm:items-end justify-between gap-6">
|
||||
<div>
|
||||
<div className="flex items-center gap-3 mb-1.5">
|
||||
<h1 className="text-3xl font-bold tracking-tight text-foreground">Mes Ateliers</h1>
|
||||
{totalCount > 0 && (
|
||||
<span className="inline-flex items-center justify-center px-2.5 h-6 rounded-full bg-primary/10 text-primary text-sm font-semibold">
|
||||
{totalCount}
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
<p className="text-sm text-muted">Tous vos ateliers en un seul endroit</p>
|
||||
</div>
|
||||
<NewWorkshopDropdown />
|
||||
</div>
|
||||
<main className="mx-auto max-w-7xl px-4">
|
||||
<PageHeader
|
||||
emoji="🗂️"
|
||||
title="Mes Ateliers"
|
||||
subtitle={
|
||||
totalCount > 0
|
||||
? `${totalCount} atelier${totalCount > 1 ? 's' : ''} · Tous vos ateliers en un seul endroit`
|
||||
: 'Tous vos ateliers en un seul endroit'
|
||||
}
|
||||
actions={<NewWorkshopDropdown />}
|
||||
/>
|
||||
|
||||
{/* Content */}
|
||||
{hasNoSessions ? (
|
||||
|
||||
Reference in New Issue
Block a user