mirror of
https://github.com/Dvorinka/MyClubServer.git
synced 2026-06-04 18:52:56 +00:00
dev day #71
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user