--- import { Code } from "astro-expressive-code/components"; import style from "./CodeSample.module.css"; import { getLangFromEnv, useTranslations } from "../../i18n/utils"; const { example: data } = Astro.props; const lang = getLangFromEnv(); const t = useTranslations(lang); type ItemExample = { type: string; code: string; description: string; }; --- { data && data.map((example: ItemExample) => (
{t("item.example")}
{example.description &&

{example.description}

}
)) }