Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Front session1_3 #8

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions front_4_web/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions front_4_web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
7 changes: 7 additions & 0 deletions front_4_web/src/modules/common/components/Button.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export const Button = (): JSX.Element=>{
return(
<div>

</div>
)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import styled from "styled-components";

export const Bottom = styled.button`

`;
4 changes: 2 additions & 2 deletions front_4_web/src/modules/dashboard/components/Content.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Map } from "../../details/components/Map";
export const Content = (): JSX.Element => {
export const Content = (props?:any): JSX.Element => {
return(
<>
<Map/>
<Map lat={0} lng={0}/>
</>
)
}
10 changes: 5 additions & 5 deletions front_4_web/src/modules/dashboard/components/MainViewer.tsx
Original file line number Diff line number Diff line change
@@ -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 (
<>
<GlobalStyles />
<div>
<NavigationTop />
<Map />
<Content/>
<NavigationBottom />
</div>
</>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Button } from 'antd';
import { StyledNavigationBottom } from './NavigationBottom.styled'
import { StyledNavigationBottom } from './styles/NavigationBottom.style'
export const NavigationBottom = () => {
return(
<StyledNavigationBottom>
Expand Down
Original file line number Diff line number Diff line change
@@ -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";

Expand Down
45 changes: 30 additions & 15 deletions front_4_web/src/modules/details/components/Map.tsx
Original file line number Diff line number Diff line change
@@ -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(
<MapContainer
style={{ height: '50vh' }}
style={{ height: '85vh' }}
center={[51.505, -0.09]}
zoom={13}
scrollWheelZoom={false}>
<TileLayer
attribution='&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"
/>
<div>
here will be our map!!
</div>
<Marker position={[51.505, -0.09]}>
<Popup>
A pretty CSS3 popup. <br /> Easily customizable.
</Popup>
</Marker>
<TileLayer attribution='&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"/>
<Marker position={[0, 0]}>
<Popup>
A popup. <br /> Easy custom.
</Popup>
</Marker>
</MapContainer>

)
Expand Down