import { useEffect, useState } from 'react'; import { Link } from 'react-router-dom'; import { api } from '../../api/client.js'; import usePageMeta from '../../hooks/usePageMeta.js'; import { useLanguage } from '../../context/LanguageContext.jsx'; import { useSiteSettings } from '../../context/SiteSettingsContext.jsx'; import { galleryCardLabelStyle } from '../../utils/galleryCardAlign.js'; export default function GalleryOverview() { const [brands, setBrands] = useState(null); const [error, setError] = useState(''); const { t } = useLanguage(); const { gallery_card_text_x: cardTextX } = useSiteSettings(); usePageMeta({ title: t('galleryOverview.metaTitle'), description: t('galleryOverview.metaDescription'), path: '/galerie', }); useEffect(() => { api.get('/gallery-brands').then(setBrands).catch((e) => setError(e.message)); }, []); return (

{t('galleryOverview.title')}

{t('galleryOverview.intro')}

{error &&

{error}

} {!brands && !error &&

{t('galleryOverview.loading')}

} {brands && brands.length === 0 && (

{t('galleryOverview.empty')}

)}
{brands?.map((brand) => ( {brand.cover_image_path ? ( {brand.name} ) : (
)}
{brand.name} ))}
); }