Full cleanup pass
This commit is contained in:
@@ -1,6 +1,11 @@
|
||||
"use client";
|
||||
|
||||
/**
|
||||
* Figma: "Card / Mini" (see registry)
|
||||
*/
|
||||
|
||||
import { memo, useMemo } from "react";
|
||||
import { useTranslation } from "../../../contexts/MessagesContext";
|
||||
import MiniView from "./Mini.view";
|
||||
import type { MiniProps } from "./Mini.types";
|
||||
|
||||
@@ -17,14 +22,16 @@ const MiniContainer = memo<MiniProps>(
|
||||
href,
|
||||
ariaLabel,
|
||||
}) => {
|
||||
const t = useTranslation("controlsChrome");
|
||||
|
||||
// Compute aria-label
|
||||
const computedAriaLabel = useMemo(
|
||||
() =>
|
||||
ariaLabel ||
|
||||
(labelLine1 && labelLine2
|
||||
? `${labelLine1} ${labelLine2}`
|
||||
: label || "Feature card"),
|
||||
[ariaLabel, labelLine1, labelLine2, label],
|
||||
: label || t("miniFeatureFallback")),
|
||||
[ariaLabel, labelLine1, labelLine2, label, t],
|
||||
);
|
||||
|
||||
// Determine wrapper element and props
|
||||
|
||||
Reference in New Issue
Block a user