guidly/src/components/quest/MapLink.tsx
laruevin d5ed7fdcf9 Initial commit: Guidly project with CI/CD pipeline
Telegram Bot + Mini App for city walking quests.
- React 19 + TypeScript + Vite 6 frontend
- Express 5 + PostgreSQL backend
- grammY Telegram bot with DeepSeek AI
- GitLab CI/CD: lint, build, deploy to production

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 11:42:42 +07:00

38 lines
948 B
TypeScript

import styles from './MapLink.module.css'
import { getLanguage } from '@/utils/telegram'
interface MapLinkProps {
lat: number
lon: number
title: string
}
export function MapLink({ lat, lon }: MapLinkProps) {
const lang = getLanguage()
const googleMapsUrl = `https://www.google.com/maps/search/?api=1&query=${lat},${lon}`
const yandexMapsUrl = `https://yandex.ru/maps/?pt=${lon},${lat}&z=17&l=map`
return (
<div className={styles.container}>
<a
href={googleMapsUrl}
target="_blank"
rel="noopener noreferrer"
className={styles.link}
>
{lang === 'ru' ? 'Google Maps' : 'Google Maps'}
</a>
<span className={styles.separator}>|</span>
<a
href={yandexMapsUrl}
target="_blank"
rel="noopener noreferrer"
className={styles.link}
>
{lang === 'ru' ? 'Яндекс Карты' : 'Yandex Maps'}
</a>
</div>
)
}