Adding a Cartouche for the card component

This commit is contained in:
2025-05-01 19:44:19 +02:00
parent 90aa5e06f2
commit 8d72172e0a
2 changed files with 23 additions and 2 deletions

View File

@@ -0,0 +1,21 @@
import { useTranslation } from "@refinedev/core";
type CartoucheProps = {
record: any
}
const Cartouche = (props: CartoucheProps) => {
const { record } = props;
const { translate: t } = useTranslation();
return (
<>
<h2>{record.label}</h2>
<ul>
{ record.created_at && <li>{t("resource.created_at")}: {record.created_at} {t("resource.created_at")}: {record.created_by}</li> }
{ record.updated_at && <li>{t("resource.updated_at")}: {record.updated_at} {t("resource.updated_by")}: {record.updated_by}</li> }
</ul>
</>
)
}
export default Cartouche;