--- // Import necessary components and utilities import { getStrapiMedia, getStrapiBaseUrl } from "../lib/strapi"; import { t, getLanguageFromPath, type SupportedLanguage } from "../lib/i18n"; import type { HTMLAttributes } from "astro/types"; // Define the props interface export interface Props extends HTMLAttributes<'div'> { elements: any[]; } // Destructure props and get BASE_URL from global config const { elements, ...otherProps } = Astro.props; const BASE_URL = getStrapiBaseUrl(); // Get current language const currentLang = getLanguageFromPath(Astro.url.pathname); ---
{ elements.length === 0 ? (

{t('elements.noElements', currentLang)}

) : ( <> {elements.map((poleElement) => (
{poleElement.mainImage.alternativeText}

{poleElement.name}

))} ) }