Admin: PageHeader H2 zamiast H1, jedna nazwa sekcji topbar/tresc/link (koniec z dublem h1)
This commit is contained in:
@@ -2,7 +2,7 @@ import type { ReactNode } from 'react';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { ArrowLeft, X } from 'lucide-react';
|
||||
import { buttonVariants } from './button';
|
||||
import { H1, H2, H3, Muted } from './typography';
|
||||
import { H2, H3, Muted } from './typography';
|
||||
import { cn } from '../../lib/utils';
|
||||
|
||||
/* Page header: title + optional badge, actions on the right (stacks on mobile) */
|
||||
@@ -18,7 +18,8 @@ export function PageHeader({
|
||||
return (
|
||||
<div className="flex flex-col sm:flex-row sm:items-center sm:justify-between gap-3 mb-5">
|
||||
<div className="flex items-center gap-3 flex-wrap">
|
||||
<H1 className="mb-0">{title}</H1>
|
||||
{/* `<h1>` należy do topbaru (tytuł strony) — nagłówek treści to `<h2>` */}
|
||||
<H2 className="mb-0">{title}</H2>
|
||||
{badge}
|
||||
</div>
|
||||
{actions}
|
||||
@@ -90,7 +91,9 @@ export function MetaItem({
|
||||
className?: string;
|
||||
}) {
|
||||
return (
|
||||
<span className={`inline-flex items-center gap-1.5 text-dim text-[0.875rem] ${className}`.trim()}>
|
||||
<span
|
||||
className={`inline-flex items-center gap-1.5 text-dim text-[0.875rem] ${className}`.trim()}
|
||||
>
|
||||
<Icon className="w-4 h-4 shrink-0" />
|
||||
<span className="min-w-0 truncate">{children}</span>
|
||||
</span>
|
||||
@@ -146,7 +149,12 @@ export function Chip({
|
||||
>
|
||||
{children}
|
||||
{onRemove && (
|
||||
<button type="button" onClick={onRemove} aria-label={removeLabel} className="text-dim hover:text-danger cursor-pointer">
|
||||
<button
|
||||
type="button"
|
||||
onClick={onRemove}
|
||||
aria-label={removeLabel}
|
||||
className="text-dim hover:text-danger cursor-pointer"
|
||||
>
|
||||
<X className="w-3.5 h-3.5" />
|
||||
</button>
|
||||
)}
|
||||
@@ -196,7 +204,9 @@ export function Tabs({
|
||||
type="button"
|
||||
onClick={() => onChange(t.id)}
|
||||
className={`px-3.5 py-2 rounded-[10px] text-[0.9rem] font-semibold whitespace-nowrap cursor-pointer transition-all duration-150 ${
|
||||
active === t.id ? 'bg-card text-ink border border-line shadow-card' : 'border border-transparent text-dim hover:text-ink'
|
||||
active === t.id
|
||||
? 'bg-card text-ink border border-line shadow-card'
|
||||
: 'border border-transparent text-dim hover:text-ink'
|
||||
}`}
|
||||
>
|
||||
{t.label}
|
||||
|
||||
@@ -43,7 +43,7 @@ export default function UserClaims() {
|
||||
return (
|
||||
<>
|
||||
<PageHeader
|
||||
title="Wnioski siłowni"
|
||||
title="Wnioski"
|
||||
actions={
|
||||
<>
|
||||
{claims.length > 0 && <Badge>{claims.length}</Badge>}
|
||||
|
||||
@@ -85,7 +85,7 @@ export default function UserInfo() {
|
||||
const areaName = (muscle: string) => areas.find((a) => a.muscle === muscle)?.name ?? muscle;
|
||||
|
||||
useTopbar({
|
||||
title: user ? `Profil — dane osobowe` : 'Dane osobowe',
|
||||
title: 'Dane osobowe',
|
||||
back: id ? `/users/${id}` : '/users',
|
||||
});
|
||||
|
||||
|
||||
@@ -35,10 +35,7 @@ export default function UserProgress() {
|
||||
|
||||
return (
|
||||
<>
|
||||
<PageHeader
|
||||
title="Postępy per ćwiczenie"
|
||||
actions={<BackButton to={id ? `/users/${id}` : '/users'} />}
|
||||
/>
|
||||
<PageHeader title="Postępy" actions={<BackButton to={id ? `/users/${id}` : '/users'} />} />
|
||||
|
||||
<Card>
|
||||
<Muted className="text-[0.875rem]">
|
||||
|
||||
Reference in New Issue
Block a user