This commit is contained in:
Tomas Dvorak
2025-10-25 16:33:53 +02:00
parent 857e6f007d
commit 3d621e2187
9 changed files with 238 additions and 121 deletions
@@ -44,9 +44,10 @@ const resolveBackendUrl = (path: string) => {
}
};
const GallerySection: React.FC = () => {
const GallerySection: React.FC<{ zoneramaUrl?: string | null }> = ({ zoneramaUrl }) => {
const [albums, setAlbums] = useState<Album[]>([]);
const [loading, setLoading] = useState(true);
const [profileUrl, setProfileUrl] = useState<string | null>(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{' '}
<Text
as="a"
href="https://zonerama.com"
href={zoneramaUrl || profileUrl || 'https://zonerama.com'}
target="_blank"
rel="noopener noreferrer"
fontWeight="600"