36 lines
1.4 KiB
JavaScript
36 lines
1.4 KiB
JavaScript
"use client";
|
|
import { Box, Button, DialogActions, DialogContent, Stack } from "@mui/material";
|
|
import React from "react";
|
|
import dynamic from "next/dynamic";
|
|
import MapLoading from "@/core/components/MapLayer/Loading";
|
|
import ShowLocationMarker from "@/core/components/ShowLocationMarker";
|
|
const MapLayer = dynamic(() => import("@/core/components/MapLayer"), {
|
|
loading: () => <MapLoading />,
|
|
ssr: false,
|
|
});
|
|
|
|
const LocationFormContent = ({ setOpenLocationDialog, start_lat, start_lng, end_lat, end_lng }) => {
|
|
return (
|
|
<>
|
|
<DialogContent>
|
|
<Box sx={{ width: "400px", height: "400px" }}>
|
|
<MapLayer>
|
|
<ShowLocationMarker
|
|
start_lat={start_lat}
|
|
start_lng={start_lng}
|
|
end_lat={end_lat}
|
|
end_lng={end_lng}
|
|
/>
|
|
</MapLayer>
|
|
</Box>
|
|
</DialogContent>
|
|
<DialogActions sx={{ justifyContent: "center", paddingBottom: 2, width: "100%" }}>
|
|
<Button onClick={() => setOpenLocationDialog(false)} variant="outlined" color="secondary">
|
|
بستن
|
|
</Button>
|
|
</DialogActions>
|
|
</>
|
|
);
|
|
};
|
|
export default LocationFormContent;
|