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 { GALLERY_CARD_ALIGN } from '../../utils/galleryCardAlign.js'; export default function GalleryOverview() { const [brands, setBrands] = useState(null); const [error, setError] = useState(''); const { t } = useLanguage(); const { gallery_card_text_align: cardAlign } = 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.intro')}
{error &&{error}
} {!brands && !error &&{t('galleryOverview.loading')}
} {brands && brands.length === 0 && ({t('galleryOverview.empty')}
)}