diff --git a/frontend/src/components/common/SponsorsSection.tsx b/frontend/src/components/common/SponsorsSection.tsx index cb86b43..433a952 100644 --- a/frontend/src/components/common/SponsorsSection.tsx +++ b/frontend/src/components/common/SponsorsSection.tsx @@ -42,7 +42,7 @@ const SponsorsSection: React.FC = ({ const fetchSponsors = async () => { try { // Try API first - const apiRes = await fetch(`${API_URL}/public/sponsors`); + const apiRes = await fetch(`${API_URL}/sponsors`); if (apiRes.ok) { const data = await apiRes.json(); if (!cancelled && Array.isArray(data)) { diff --git a/frontend/src/components/home/GallerySection.tsx b/frontend/src/components/home/GallerySection.tsx index bed37fb..697fab9 100644 --- a/frontend/src/components/home/GallerySection.tsx +++ b/frontend/src/components/home/GallerySection.tsx @@ -44,9 +44,10 @@ const resolveBackendUrl = (path: string) => { } }; -const GallerySection: React.FC = () => { +const GallerySection: React.FC<{ zoneramaUrl?: string | null }> = ({ zoneramaUrl }) => { const [albums, setAlbums] = useState([]); const [loading, setLoading] = useState(true); + const [profileUrl, setProfileUrl] = useState(null); // Dark mode colors const cardBg = useColorModeValue('white', 'gray.800'); @@ -72,6 +73,9 @@ const GallerySection: React.FC = () => { // Get profile albums (newest/main source) if (profileRes.status === 'fulfilled' && profileRes.value.ok) { const profileData = await profileRes.value.json(); + if (profileData && profileData.input_link) { + setProfileUrl(profileData.input_link); + } combinedAlbums = [...(profileData.albums || [])]; } @@ -176,7 +180,7 @@ const GallerySection: React.FC = () => { 📸 Všechny fotografie jsou z platformy{' '} = ({ isOpen, match, onClose, role={onTeamClick ? 'button' : undefined} tabIndex={onTeamClick ? 0 : undefined} > - {match.home + {sanitizeClubName(match.home) || 'Domácí'} @@ -157,7 +167,15 @@ export const MatchModal: React.FC = ({ isOpen, match, onClose, role={onTeamClick ? 'button' : undefined} tabIndex={onTeamClick ? 0 : undefined} > - {match.away + {sanitizeClubName(match.away) || 'Hosté'} diff --git a/frontend/src/components/home/PhotosSection.tsx b/frontend/src/components/home/PhotosSection.tsx index 368cd49..ab84c09 100644 --- a/frontend/src/components/home/PhotosSection.tsx +++ b/frontend/src/components/home/PhotosSection.tsx @@ -81,7 +81,7 @@ const PhotosSection: React.FC<{ zoneramaUrl?: string | null }> = ({ zoneramaUrl 📸 Fotografie z{' '} { } catch {} // Fetch sponsors try { - const sponsorsRes = await fetch(`${API_URL}/public/sponsors`); + const sponsorsRes = await fetch(`${API_URL}/sponsors`); if (sponsorsRes.ok) { const data = await sponsorsRes.json(); if (!cancelled && Array.isArray(data)) { diff --git a/frontend/src/components/layout/MainLayout.tsx b/frontend/src/components/layout/MainLayout.tsx index 504bee5..410ce90 100644 --- a/frontend/src/components/layout/MainLayout.tsx +++ b/frontend/src/components/layout/MainLayout.tsx @@ -5,6 +5,7 @@ import Navbar from '../Navbar'; import Footer from './Footer'; import { useAllPageElementConfigs } from '../../hooks/usePageElementConfig'; import SpartaNavbar from '../elements/SpartaNavbar'; +import SponsorsSection from '../common/SponsorsSection'; interface MainLayoutProps { children: ReactNode; @@ -50,6 +51,7 @@ export const MainLayout: React.FC = ({ children, headerInsideCo {children} +