diff --git a/front_4_web/package-lock.json b/front_4_web/package-lock.json index f265ab4..afbce88 100644 --- a/front_4_web/package-lock.json +++ b/front_4_web/package-lock.json @@ -19,6 +19,7 @@ "@types/react-router-dom": "^5.3.3", "@types/styled-components": "^5.1.26", "antd": "^5.5.2", + "leaflet": "^1.9.4", "react": "^18.2.0", "react-dom": "^18.2.0", "react-leaflet": "^4.2.1", @@ -12096,8 +12097,7 @@ "node_modules/leaflet": { "version": "1.9.4", "resolved": "https://registry.npmjs.org/leaflet/-/leaflet-1.9.4.tgz", - "integrity": "sha512-nxS1ynzJOmOlHp+iL3FyWqK89GtNL8U8rvlMOsQdTTssxZwCXh8N2NB3GDQOL+YR3XnWyZAxwQixURb+FA74PA==", - "peer": true + "integrity": "sha512-nxS1ynzJOmOlHp+iL3FyWqK89GtNL8U8rvlMOsQdTTssxZwCXh8N2NB3GDQOL+YR3XnWyZAxwQixURb+FA74PA==" }, "node_modules/leven": { "version": "3.1.0", diff --git a/front_4_web/package.json b/front_4_web/package.json index 403ece5..1f96a07 100644 --- a/front_4_web/package.json +++ b/front_4_web/package.json @@ -14,6 +14,7 @@ "@types/react-router-dom": "^5.3.3", "@types/styled-components": "^5.1.26", "antd": "^5.5.2", + "leaflet": "^1.9.4", "react": "^18.2.0", "react-dom": "^18.2.0", "react-leaflet": "^4.2.1", diff --git a/front_4_web/src/modules/common/components/Button.tsx b/front_4_web/src/modules/common/components/Button.tsx new file mode 100644 index 0000000..bb6271b --- /dev/null +++ b/front_4_web/src/modules/common/components/Button.tsx @@ -0,0 +1,7 @@ +export const Button = (): JSX.Element=>{ + return( +
+ +
+ ) +} \ No newline at end of file diff --git a/front_4_web/src/modules/common/components/styles/Button.style.ts b/front_4_web/src/modules/common/components/styles/Button.style.ts new file mode 100644 index 0000000..7a18a4d --- /dev/null +++ b/front_4_web/src/modules/common/components/styles/Button.style.ts @@ -0,0 +1,5 @@ +import styled from "styled-components"; + +export const Bottom = styled.button` + +`; \ No newline at end of file diff --git a/front_4_web/src/modules/dashboard/components/Content.tsx b/front_4_web/src/modules/dashboard/components/Content.tsx index fc84de9..5244690 100644 --- a/front_4_web/src/modules/dashboard/components/Content.tsx +++ b/front_4_web/src/modules/dashboard/components/Content.tsx @@ -1,8 +1,8 @@ import { Map } from "../../details/components/Map"; -export const Content = (): JSX.Element => { +export const Content = (props?:any): JSX.Element => { return( <> - + ) } \ No newline at end of file diff --git a/front_4_web/src/modules/dashboard/components/MainViewer.tsx b/front_4_web/src/modules/dashboard/components/MainViewer.tsx index 5c646d0..8a60613 100644 --- a/front_4_web/src/modules/dashboard/components/MainViewer.tsx +++ b/front_4_web/src/modules/dashboard/components/MainViewer.tsx @@ -1,14 +1,14 @@ -import GlobalStyles from "../../common/styles/GlobalStyles" -import { NavigationTop } from "../../common/components/Navigation/Top/NavigationTop" -import { NavigationBottom } from "../../common/components/Navigation/Bottom/NavigationBottom" -import { Map } from "../../details/components/Map" +import GlobalStyles from "./styles/Global.style" +import { NavigationTop } from "./NavigationTop" +import { NavigationBottom } from "./NavigationBottom" +import { Content } from "./Content" export const MainViewer = () => { return ( <>
- +
diff --git a/front_4_web/src/modules/common/components/Navigation/Bottom/NavigationBottom.tsx b/front_4_web/src/modules/dashboard/components/NavigationBottom.tsx similarity index 81% rename from front_4_web/src/modules/common/components/Navigation/Bottom/NavigationBottom.tsx rename to front_4_web/src/modules/dashboard/components/NavigationBottom.tsx index 020af4e..c44f950 100644 --- a/front_4_web/src/modules/common/components/Navigation/Bottom/NavigationBottom.tsx +++ b/front_4_web/src/modules/dashboard/components/NavigationBottom.tsx @@ -1,5 +1,5 @@ import { Button } from 'antd'; -import { StyledNavigationBottom } from './NavigationBottom.styled' +import { StyledNavigationBottom } from './styles/NavigationBottom.style' export const NavigationBottom = () => { return( diff --git a/front_4_web/src/modules/common/components/Navigation/Top/NavigationTop.tsx b/front_4_web/src/modules/dashboard/components/NavigationTop.tsx similarity index 84% rename from front_4_web/src/modules/common/components/Navigation/Top/NavigationTop.tsx rename to front_4_web/src/modules/dashboard/components/NavigationTop.tsx index e8c8167..dd25031 100644 --- a/front_4_web/src/modules/common/components/Navigation/Top/NavigationTop.tsx +++ b/front_4_web/src/modules/dashboard/components/NavigationTop.tsx @@ -1,5 +1,5 @@ -import { StyledNavigationTop, StyledDiv, NavigationProfile } from "./NavigationTop.styled"; -import Brand from '../../../../../assets/images/Brand.svg'; +import { StyledNavigationTop, StyledDiv, NavigationProfile } from "./styles/NavigationTop.style"; +import Brand from '../../../assets/images/Brand.svg'; import { NotificationFilled } from '@ant-design/icons'; import { Button } from "antd"; diff --git a/front_4_web/src/modules/common/styles/GlobalStyles.ts b/front_4_web/src/modules/dashboard/components/styles/Global.style.ts similarity index 100% rename from front_4_web/src/modules/common/styles/GlobalStyles.ts rename to front_4_web/src/modules/dashboard/components/styles/Global.style.ts diff --git a/front_4_web/src/modules/common/components/Navigation/Bottom/NavigationBottom.styled.ts b/front_4_web/src/modules/dashboard/components/styles/NavigationBottom.style.ts similarity index 100% rename from front_4_web/src/modules/common/components/Navigation/Bottom/NavigationBottom.styled.ts rename to front_4_web/src/modules/dashboard/components/styles/NavigationBottom.style.ts diff --git a/front_4_web/src/modules/common/components/Navigation/Top/NavigationTop.styled.ts b/front_4_web/src/modules/dashboard/components/styles/NavigationTop.style.ts similarity index 100% rename from front_4_web/src/modules/common/components/Navigation/Top/NavigationTop.styled.ts rename to front_4_web/src/modules/dashboard/components/styles/NavigationTop.style.ts diff --git a/front_4_web/src/modules/details/components/Map.tsx b/front_4_web/src/modules/details/components/Map.tsx index cdc17d1..c46e5a3 100644 --- a/front_4_web/src/modules/details/components/Map.tsx +++ b/front_4_web/src/modules/details/components/Map.tsx @@ -1,23 +1,38 @@ -import { TileLayer, MapContainer, Marker, Popup} from 'react-leaflet' -export const Map = (): JSX.Element=>{ +import { TileLayer, + MapContainer, + Marker, + Popup, + /*useMapEvents*/ + } from 'react-leaflet'; +//import {useState, useEffect} from 'react'; +//import L from "leaflet"; + +interface CoordinatesStart { + lat: number, + lng: number +}; + +interface CoordinatesDestinate { + lat: number, + lng: number +}; + + +export const Map = (positionStart: CoordinatesStart, destinationEnd: CoordinatesDestinate): JSX.Element=>{ + return( - -
- here will be our map!! -
- - - A pretty CSS3 popup.
Easily customizable. -
-
+ + + + A popup.
Easy custom. +
+
)