added address table, super awesome - bunch of gitea workflow options - "Processed Flyers" made better
Some checks failed
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Failing after 1m1s
Some checks failed
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Failing after 1m1s
This commit is contained in:
30
src/components/MapView.tsx
Normal file
30
src/components/MapView.tsx
Normal file
@@ -0,0 +1,30 @@
|
||||
// src/components/MapView.tsx
|
||||
import React from 'react';
|
||||
|
||||
interface MapViewProps {
|
||||
latitude: number;
|
||||
longitude: number;
|
||||
}
|
||||
|
||||
const apiKey = import.meta.env.VITE_GOOGLE_MAPS_EMBED_API_KEY;
|
||||
|
||||
export const MapView: React.FC<MapViewProps> = ({ latitude, longitude }) => {
|
||||
if (!apiKey) {
|
||||
return <div className="text-sm text-red-500">Map view is disabled: API key is not configured.</div>;
|
||||
}
|
||||
|
||||
const mapSrc = `https://www.google.com/maps/embed/v1/view?key=${apiKey}¢er=${latitude},${longitude}&zoom=14`;
|
||||
|
||||
return (
|
||||
<div className="w-full h-64 rounded-lg overflow-hidden border border-gray-300 dark:border-gray-600">
|
||||
<iframe
|
||||
width="100%"
|
||||
height="100%"
|
||||
style={{ border: 0 }}
|
||||
loading="lazy"
|
||||
allowFullScreen
|
||||
src={mapSrc}
|
||||
></iframe>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user