-
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.
Merge pull request from /feature/parceiros
Parceiros_big grid style done
- Loading branch information
Showing
10 changed files
with
166 additions
and
18 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,57 @@ | ||
import { useQuery } from "@tanstack/react-query"; | ||
import "../style/components/Parceiros_big.scss"; | ||
|
||
import axios from "axios"; | ||
|
||
function Parceiros_big() { | ||
function ApiAvasus(page: number, limit: number) { | ||
return axios | ||
.get(`http://0.0.0.0:3004/parceiros?_page=${page}&_limit=${limit}`) | ||
.then((response) => response.data); | ||
} | ||
|
||
//const [modulos, setModulos] = useState(1); | ||
|
||
const { data, isLoading, isError, error, isFetching }: any = useQuery({ | ||
queryKey: ["modulosSmall", 1, 9], | ||
queryFn: () => ApiAvasus(1, 9), | ||
}); | ||
if (isLoading || isFetching) { | ||
return ( | ||
<p style={{ color: "black", fontSize: "30px", marginTop: "20px" }}> | ||
Carregando Modulos.... | ||
</p> | ||
); | ||
} else if (isError) { | ||
return ( | ||
<p style={{ color: "black", fontSize: "30px", marginTop: "20px" }}> | ||
Error: {error.message} | ||
</p> | ||
); | ||
} | ||
|
||
return ( | ||
<div>Parceiros_big</div> | ||
) | ||
<> | ||
<section className="parceiros"> | ||
<h2 className="parceiros-cabecalho">Nossos parceiros</h2> | ||
<span className="parceiros-resultados"># de # resultados</span> | ||
<ol className="parceiros-lista"> | ||
{data?.map((data: any) => { | ||
return ( | ||
<li className="parceiros-item" key={data?.id}> | ||
<img | ||
className="parceiros-item-imagem" | ||
src={data?.capa} | ||
alt="Capa parceiro" | ||
/> | ||
<p className="parceiros-item-nome">{data.titulo}</p> | ||
</li> | ||
); | ||
})} | ||
</ol> | ||
</section> | ||
</> | ||
); | ||
} | ||
|
||
export default Parceiros_big | ||
export default Parceiros_big; |
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,5 +1,15 @@ | ||
import MainHeader from "../components/MainHeader"; | ||
|
||
import Footer from "../components/Footer"; | ||
|
||
const Contato = () => { | ||
return <h1>Contato</h1>; | ||
return ( | ||
<main> | ||
<MainHeader /> | ||
<h1>Contato</h1> | ||
<Footer /> | ||
</main> | ||
); | ||
}; | ||
|
||
export default Contato; |
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 |
---|---|---|
@@ -1,6 +1,15 @@ | ||
import MainHeader from "../components/MainHeader"; | ||
import Parceiros_big from "../components/Parceiros_big"; | ||
import Footer from "../components/Footer"; | ||
|
||
const Parceiros = () => { | ||
return <div>Parceiros</div>; | ||
}; | ||
|
||
export default Parceiros; | ||
|
||
return ( | ||
<main> | ||
<MainHeader /> | ||
<Parceiros_big /> | ||
<Footer /> | ||
</main> | ||
); | ||
}; | ||
|
||
export default Parceiros; |
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,40 @@ | ||
@import "../variables"; | ||
|
||
.parceiros { | ||
width: 80%; | ||
.parceiros-cabecalho { | ||
margin-bottom: 1rem; | ||
text-align: left; | ||
font-size: 2rem; | ||
} | ||
.parceiros-resultados { | ||
display: inline-block; | ||
padding: 1rem 0rem; | ||
text-align: left; | ||
color: $ui-dark; | ||
font-weight: 400; | ||
width: 100%; | ||
} | ||
.parceiros-lista { | ||
grid-template-columns: 1fr 1fr 1fr; | ||
justify-content: center; | ||
align-items: baseline; | ||
text-align: center; | ||
margin: 1rem 0rem; | ||
list-style: none; | ||
display: grid; | ||
gap: 1rem; | ||
.parceiros-item { | ||
.parceiros-item-imagem { | ||
height: fit-content; | ||
padding: 1rem 0rem; | ||
width: 15rem; | ||
} | ||
.parceiros-item-nome { | ||
border-top: 2px solid $red-ligh; | ||
padding: 1rem 0rem; | ||
width: 100%; | ||
} | ||
} | ||
} | ||
} |