-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
388 additions
and
310 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,13 +1,5 @@ | ||
|
||
|
||
function footer() { | ||
|
||
return( | ||
|
||
<h3>Created by Thaís Gonçalves</h3> | ||
|
||
|
||
) | ||
return <h3>Created by Thaís Gonçalves</h3>; | ||
} | ||
|
||
export default footer; | ||
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,31 @@ | ||
import "leaflet/dist/leaflet.css"; | ||
import { MapContainer, Marker, Popup, TileLayer } from "react-leaflet"; | ||
|
||
function Mapa(props) { | ||
const { position, markers } = props; | ||
if (!markers) return null; | ||
if(markers === 0) { | ||
console.log(markers) | ||
} | ||
return ( | ||
<MapContainer | ||
center={position} | ||
zoom={10} | ||
scrollWheelZoom={false} | ||
{...props} | ||
> | ||
<TileLayer | ||
attribution='© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors' | ||
url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png" | ||
/> | ||
{markers.map((locaisMap, index) => { | ||
return <Marker key={index} position={[Number(locaisMap.localizacao_latitude), Number(locaisMap.localizacao_longitude)]}> | ||
<Popup> | ||
A pretty CSS3 popup. <br /> Easily customizable. | ||
</Popup> | ||
</Marker>; | ||
})} | ||
</MapContainer> | ||
); | ||
} | ||
export default Mapa; |
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 |
---|---|---|
@@ -1,38 +1,32 @@ | ||
import { useContext, useEffect, useState } from "react"; | ||
import { Link } from "react-router-dom"; | ||
import {useState, useEffect, useContext} from "react" | ||
import { UsuariosContext } from "../../Context/UsuariosContext"; | ||
|
||
function navHeader() { | ||
|
||
const [isLogCount, setIsLogCount] = useState(0) | ||
const {logout} = useContext(UsuariosContext); | ||
const [isLogCount, setIsLogCount] = useState(0); | ||
const { logout } = useContext(UsuariosContext); | ||
|
||
useEffect(() => { | ||
fetch("http://localhost:3000/listUsuarios?isLogado=true") | ||
.then((response) => response.json()) | ||
.then((data) => setIsLogCount(data.length)) | ||
.catch((error) => console.error(error)); | ||
}, []) | ||
|
||
return( | ||
|
||
<nav> | ||
<div className="links-menu"> | ||
<Link to="/">Home</Link> | ||
<Link to="/cadastroExercicios">Cadastro de Locais</Link> | ||
<Link to="/editExercicios">Edição Locais</Link> | ||
</div> | ||
<div className="users-logs"> | ||
Usuarios logados: {isLogCount && isLogCount} | ||
</div> | ||
|
||
<button onClick={logout}>Sair</button> | ||
|
||
|
||
</nav> | ||
|
||
|
||
) | ||
}, []); | ||
|
||
return ( | ||
<nav> | ||
<div className="links-menu"> | ||
<Link to="/">Home</Link> | ||
<Link to="/cadastroExercicios">Cadastro de Locais</Link> | ||
<Link to="/editExercicios">Edição Locais</Link> | ||
</div> | ||
<div className="users-logs"> | ||
Usuarios logados: {isLogCount && isLogCount} | ||
</div> | ||
|
||
<button onClick={logout}>Sair</button> | ||
</nav> | ||
); | ||
} | ||
|
||
export default navHeader; | ||
export default navHeader; |
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 |
---|---|---|
@@ -1,24 +1,19 @@ | ||
|
||
|
||
const Cardcomponents = (props) => { | ||
const local = props.localprop | ||
return( | ||
|
||
<div> | ||
<h1>{local.nome_local}</h1> | ||
<span>{local.identificador_usuario}</span> | ||
<span>{local.descricao_local}</span> | ||
<span>{local.localizacao_cep}</span> | ||
<span>{local.localizacao_endereco}</span> | ||
<span>{local.localizacao_cidade}</span> | ||
<span>{local.localizacao_estado}</span> | ||
<span>{local.localizacao_coordenadas}</span> | ||
<span>{local.tipos_esportes}</span> | ||
<span>{local.id}</span> | ||
|
||
</div> | ||
|
||
) | ||
} | ||
const local = props.localprop; | ||
return ( | ||
<div> | ||
<h1>{local.nome_local}</h1> | ||
<span>{local.identificador_usuario}</span> | ||
<span>{local.descricao_local}</span> | ||
<span>{local.localizacao_cep}</span> | ||
<span>{local.localizacao_endereco}</span> | ||
<span>{local.localizacao_cidade}</span> | ||
<span>{local.localizacao_estado}</span> | ||
<span>{local.localizacao_coordenadas}</span> | ||
<span>{local.tipos_esportes}</span> | ||
<span>{local.id}</span> | ||
</div> | ||
); | ||
}; | ||
|
||
export default Cardcomponents | ||
export default Cardcomponents; |
Oops, something went wrong.