reworked slider + added coaches page

This commit is contained in:
Salam-vsem
2025-05-15 00:59:22 +03:00
parent 1b8cb5dae9
commit 2c1ebe5dae
32 changed files with 389 additions and 201 deletions

View File

@@ -4,20 +4,12 @@ import { Image } from 'astro:assets'
import logoSrc from '@/assets/logo.png'
import type { z } from 'astro:content'
import type { footerSchema } from '@/content.config'
import type React from 'react'
import { TelegramIcon } from '@/assets/icons/TelegramIcon'
import { InstagramIcon } from '@/assets/icons/InstagramIcon'
import type { IconProps } from '@/assets/icons/types'
import { SocialMediaIcon } from './SocialMediaIcon'
type Props = z.infer<typeof footerSchema> & {
lang?: string
}
const SOCIAL_MEDIA_ICONS_MAP: Record<string, React.ComponentType<IconProps>> = {
telegram: TelegramIcon,
instagram: InstagramIcon,
}
const { lang, socialMediaLinks } = Astro.props
const t = useTranslations(lang)
---
@@ -40,11 +32,12 @@ const t = useTranslations(lang)
socialMediaLinks && (
<div class="flex gap-4 text-text-light">
{socialMediaLinks.map(({ href, target, icon }) => {
const Icon = SOCIAL_MEDIA_ICONS_MAP[icon]
return (
<a href={href} target={target} rel="noopener noreferrer">
<Icon className="fill-text hover:fill-text-light transition-all duration-300" />
<SocialMediaIcon
type={icon}
className="fill-text hover:fill-text-light transition-all duration-300"
/>
</a>
)
})}