Download src/components/ui/MapPreview/MapPreview.jsx from TA-PangandaranAI/PangandaranAI_FE: direct link, hf CLI and curl.
- Browser
- Download file 759 Bytes
-
https://huggingface.co/spaces/TA-PangandaranAI/PangandaranAI_FE/resolve/main/src/components/ui/MapPreview/MapPreview.jsx
- Command line
-
hf download hf://spaces/TA-PangandaranAI/PangandaranAI_FE/src/components/ui/MapPreview/MapPreview.jsx
-
curl -L -o MapPreview.jsx https://huggingface.co/spaces/TA-PangandaranAI/PangandaranAI_FE/resolve/main/src/components/ui/MapPreview/MapPreview.jsx
759 Bytes
| 'use client'; | |
| import styles from './MapPreview.module.css'; | |
| export default function MapPreview({ lat, lng, label = 'Buka Map' }) { | |
| const mapUrl = `https://www.google.com/maps?q=${lat},${lng}`; | |
| return ( | |
| <div className={styles.container}> | |
| <div className={styles.mapPlaceholder}> | |
| <span className={styles.pinIcon}>📍</span> | |
| <span className={styles.coords}> | |
| {lat?.toFixed(4)}, {lng?.toFixed(4)} | |
| </span> | |
| </div> | |
| <a | |
| href={mapUrl} | |
| target="_blank" | |
| rel="noopener noreferrer" | |
| className={styles.openBtn} | |
| > | |
| {label} | |
| </a> | |
| </div> | |
| ); | |
| } | |