-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: adicionando 'search-ip' ao projeto. * feat: adicionando a variavel 'requestQuery'. * feat: Adding a new link to capture the flags of the countries. * feat: Adding the 'requestDomainAndIp' variable and passing it as a parameter to the 'serviceIpApi' function. * feat: adding app.tsx * feat: adding types to SearchMap * feat: modifying types of the Data interface. * feat: adding a Footer to the project. * feat: adding style to the Footer. * style: adding z-index to the 'HeaderComponent' * feat: capitalizing the first letter of 'world connection'. * fix: removing the 'SearchMap' file and adding 'index.tsx'. * style: main style * feat: adding Footer * fix: removing the 'SearchMap' file and adding 'index.tsx'.
- Loading branch information
Showing
15 changed files
with
163 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import { SearchMapProps, ViewPort } from "../../types"; | ||
import { useState, useEffect } from "react"; | ||
import Map from "react-map-gl"; | ||
|
||
export const SearchMap = ({ longitude, latitude }: SearchMapProps) => { | ||
const [viewPort, setViewPort] = useState<ViewPort>({ | ||
attributionControl: false, | ||
longitude: longitude, | ||
latitude: latitude, | ||
zoom: 5, | ||
}); | ||
|
||
const [screenWidth, setScreenWidth] = useState<number>(); | ||
|
||
useEffect(() => { | ||
setScreenWidth(() => { | ||
let width = window.innerWidth; | ||
const getWidth = width >= 768 ? 1280 : 420; | ||
|
||
return getWidth; | ||
}) | ||
}); | ||
|
||
useEffect(() => { | ||
setViewPort({ | ||
attributionControl: false, | ||
longitude: longitude, | ||
latitude: latitude, | ||
zoom: viewPort.zoom, | ||
}); | ||
}, [longitude, latitude]); | ||
|
||
return ( | ||
<Map | ||
mapLib={import("mapbox-gl")} | ||
initialViewState={{ ...viewPort }} | ||
style={{ width: screenWidth, height: 420}} | ||
mapStyle="mapbox://styles/mapbox/streets-v10" | ||
mapboxAccessToken={import.meta.env.VITE_MAPBOX_TOKEN} /> | ||
); | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import Logo from "../../assets/images/Logo.svg"; | ||
import BohrLogo from "../../assets/images/bohr.svg"; | ||
import GithubLogo from "../../assets/images/github.svg"; | ||
|
||
import * as S from "./style" | ||
|
||
const Footer = () => { | ||
return ( | ||
<S.FooterComponent> | ||
<S.FooterTopComponent> | ||
<img src={Logo} alt="Logo do Ipcats" /> | ||
<S.IconsComponent> | ||
<S.Links> | ||
<S.Icons src={ BohrLogo } alt="logo do bohr.io"/> | ||
</S.Links> | ||
<S.Links> | ||
<S.Icons src={ GithubLogo } alt="logo do Github" /> | ||
</S.Links> | ||
</S.IconsComponent> | ||
</S.FooterTopComponent> | ||
<S.FooterBottomComponent> | ||
<p>Direitos Reservados</p> | ||
</S.FooterBottomComponent> | ||
</S.FooterComponent> | ||
) | ||
} | ||
|
||
export default Footer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import styled from "styled-components"; | ||
|
||
export const FooterComponent = styled.footer` | ||
align-items: center; | ||
margin: 0 auto; | ||
padding: 0 1.5rem; | ||
`; | ||
|
||
export const FooterTopComponent = styled.div` | ||
border-bottom: 1px #6B6B6B solid; | ||
justify-content: space-between; | ||
padding-bottom: 0.5rem; | ||
padding: 0rem 0.5rem; | ||
display: flex; | ||
`; | ||
|
||
export const IconsComponent = styled.div` | ||
display: flex; | ||
gap: 1rem; | ||
`; | ||
|
||
export const Links = styled.a` | ||
text-decoration: none; | ||
`; | ||
|
||
export const Icons = styled.img` | ||
width: 2.6875rem; | ||
height: 2.625rem; | ||
` | ||
|
||
export const FooterBottomComponent = styled.div` | ||
padding-top: 0.5rem; | ||
text-align: center; | ||
color: #FFFFFF; | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters