reworked slider + added coaches page
This commit is contained in:
@@ -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>
|
||||
)
|
||||
})}
|
||||
|
||||
Reference in New Issue
Block a user