mediahub-fe/components/maps/MapHome.tsx

30 lines
692 B
TypeScript
Raw Permalink Normal View History

import React, { Component } from "react";
2025-07-14 16:34:52 +00:00
import Places from "./Maps";
interface MapHomeProps {
newLat?: any;
newLng?: any;
draggable?: boolean;
2025-07-14 16:34:52 +00:00
setLocation: (location: string) => void;
}
class MapHome extends Component<MapHomeProps> {
render() {
const { newLat, newLng, draggable, setLocation } = this.props;
const lat = newLat || -6.2393033;
const lng = newLng || 106.8013579;
return (
<div style={{ marginBottom: "10px", marginTop: "8px" }}>
<Places
center={{ lat: Number(lat), lng: Number(lng) }}
draggable={draggable}
2025-07-14 16:34:52 +00:00
onLocationChange={setLocation}
/>
</div>
);
}
}
export default MapHome;