mirror of
https://github.com/LucasVbr/meeting-app.git
synced 2026-12-05 17:30:50 +00:00
Add picture in chat and button to dashboard
Took 28 minutes
This commit is contained in:
@@ -1,31 +1,28 @@
|
||||
import { Flex } from "@chakra-ui/react";
|
||||
import { MapContainer, TileLayer } from "react-leaflet";
|
||||
import SimpleMarkerBar from "./SimpleMarkerBar";
|
||||
import "leaflet/dist/leaflet.css";
|
||||
import {Flex} from '@chakra-ui/react';
|
||||
import {MapContainer, TileLayer} from 'react-leaflet';
|
||||
import SimpleMarkerBar from './SimpleMarkerBar';
|
||||
import 'leaflet/dist/leaflet.css';
|
||||
|
||||
type MapBarProps = {
|
||||
lat: string;
|
||||
lon: string;
|
||||
name: string;
|
||||
align: "left" | "right";
|
||||
align: 'left' | 'right';
|
||||
};
|
||||
|
||||
export default function MapBar({ lat, lon, name, align }: MapBarProps) {
|
||||
export default function MapBar({lat, lon, name}: MapBarProps) {
|
||||
return (
|
||||
<Flex justifyContent={align}>
|
||||
<MapContainer
|
||||
center={[Number(lat), Number(lon)]}
|
||||
zoom={13}
|
||||
minZoom={6}
|
||||
zoomControl={false}
|
||||
style={{ width: "100%", height: "20rem" }}
|
||||
>
|
||||
center={[Number(lat), Number(lon)]}
|
||||
zoom={13}
|
||||
minZoom={6}
|
||||
zoomControl={false}
|
||||
style={{width: '100%', height: '20rem'}}>
|
||||
<TileLayer
|
||||
url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"
|
||||
attribution='© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
|
||||
url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"
|
||||
attribution='© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
|
||||
/>
|
||||
<SimpleMarkerBar lat={lat} lon={lon} name={name} />
|
||||
<SimpleMarkerBar lat={lat} lon={lon} name={name}/>
|
||||
</MapContainer>
|
||||
</Flex>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user