refactor(charts): route the mood chart header through TileHeader

The mood chart hand-rolled a CardTitle where every other insights tile
header goes through TileHeader. Swap it for the shared primitive, which
renders the same CardTitle at text-base, and drop the now-unused CardTitle
import. Like-for-like; the surrounding control rows are untouched.
This commit is contained in:
Marc-André Bombeck committed 2026-08-10 10:23:24 +02:00
1 parent 6130f6ee6f
commit cfda1d9a78
1 file changed
+3 -2
+3 -2
View File
@@ -17,8 +17,9 @@ import {
import { useEffect, useState, useMemo, useRef } from "react";
import { Button } from "@/components/ui/button";
import { Skeleton } from "@/components/ui/skeleton";
import { Card, CardHeader, CardTitle, CardContent } from "@/components/ui/card";
import { Card, CardHeader, CardContent } from "@/components/ui/card";
import { TagChip } from "@/components/ui/tag-chip";
import { TileHeader } from "@/components/insights/tile-header";
import { useTranslations } from "@/lib/i18n/context";
import { makeBucketLabelFormatters } from "@/lib/charts/bucket-label";
import { readStoredTimezone } from "@/lib/timezone-mirror";
@@ -1034,7 +1035,7 @@ export function MoodChart({
back to side-by-side. */}
<div className="flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between">
<div className="flex flex-wrap items-center gap-2">
<CardTitle className="text-base">{displayTitle}</CardTitle>
<TileHeader title={displayTitle} />
{activeBucket !== "day" && (
<TagChip className="hidden tracking-wide uppercase sm:inline-flex">
{t(