This commit is contained in:
Tomas Dvorak
2025-10-17 17:39:11 +02:00
parent 35d0954afd
commit e9a63073e5
61 changed files with 3824 additions and 1061 deletions
@@ -57,6 +57,8 @@ import ContactMap from '../../components/home/ContactMap';
import RichTextEditor from '../../components/common/RichTextEditor';
import { getCachedYouTube, YouTubeVideo } from '../../services/youtube';
import { FiVideo, FiYoutube, FiLink } from 'react-icons/fi';
import ThumbnailPreview from '../../components/common/ThumbnailPreview';
import { assetUrl } from '../../utils/url';
const types: Array<{ value: Event['type']; label: string }> = [
{ value: 'match', label: 'Zápas' },
@@ -373,6 +375,7 @@ const AdminActivitiesPage: React.FC = () => {
<Table size="sm">
<Thead>
<Tr>
<Th>Náhled</Th>
<Th>Název</Th>
<Th>Typ</Th>
<Th>Začátek</Th>
@@ -384,10 +387,28 @@ const AdminActivitiesPage: React.FC = () => {
</Thead>
<Tbody>
{isLoading && (
<Tr><Td colSpan={7}>Načítání</Td></Tr>
<Tr><Td colSpan={8}>Načítání</Td></Tr>
)}
{!isLoading && events.map(ev => (
<Tr key={ev.id}>
<Td>
{(ev as any).image_url ? (
<ThumbnailPreview
src={assetUrl((ev as any).image_url) || (ev as any).image_url}
alt={ev.title}
size="48px"
previewSize="350px"
/>
) : (
<ChakraImage
src={settingsQ.data?.club_logo_url || '/dist/img/logo-club-empty.svg'}
alt="No image"
boxSize="48px"
objectFit="contain"
opacity={0.3}
/>
)}
</Td>
<Td>{ev.title}</Td>
<Td>{ev.type}</Td>
<Td>{new Date(ev.start_time).toLocaleString()}</Td>