Skip to content

Commit

Permalink
republic converted back to class + function to get info on republic p…
Browse files Browse the repository at this point in the history
…rototype

That's about it.
  • Loading branch information
RA-Salles committed Aug 13, 2024
1 parent d7f739d commit 8788636
Showing 1 changed file with 74 additions and 47 deletions.
121 changes: 74 additions & 47 deletions src/components/pages/republica.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
import React from "react";
//import './styles/republica.css'

/*
Yo wtf is going on here? LOL
Objeticves:
Expand All @@ -15,6 +12,18 @@ Notes:
2- The idea here is simple: Get the republic name, host, price and photos. All of that is only possible of happening once the API is... something
*/

import React from "react";
//import './styles/republica.css'

function getRepublicInfo(id) {
//1. send a request to the db
//2. gather info
//3. return the info
//profit?
console.log("le sex") //erase this, plz.

}

const Header = () => {
const title = {
color: "white",
Expand All @@ -34,53 +43,71 @@ const Header = () => {
}
// NEED API

function republica() {
class republica extends React.Component {
constructor(props) {
super(props);
this.majorMalfunction = gatherRepublicInfo(props.id) //this will return an undefined. Very funny. FIXME.
this.images = this.majorMalfunction.images
this.name = "very funny" //TODO
this.value = "IF YOU SEE THIS, THE DB AIN'T SENDING SHIT" //TODO
this.mainGuy = "SUPER PLACEHOLDER MAN" //TODO
}


return(
<div>
<Header />
<h2 className="RepName">Nome da república</h2>
<div className="restante">
<div className="repsImages">
<img src="images/image1.jpg" className="imagem" />
<div className="imagem-dividida">
<img
src="images/image2.jpg"
className="sub-imagem"
style={{ borderTopRightRadius: 40 }}
/>
<img
src="images/image4.jpg"
className="sub-imagem"
style={{ borderBottomRightRadius: 40, marginTop: 10 }}
/>
</div>
</div>
<div className="repInfos">
<div>
<label htmlFor="" className="Valor">
R$1500,00
</label>
</div>
<div className="fotoContainer">
<label htmlFor="" style={{ fontSize: 25 }}>
Anfritrião
</label>
<a href="">
<img src="images/teste.png" className="fotoImage" alt="" />
</a>
<a href="">
<label htmlFor="" className="nomeAnfitriao">
Adair de Souza
</label>
</a>
render() {
return (
<div>
<Header />
<h2 className="RepName">
{this.name}
</h2>
<div className="restante">
<div className="repsImages">
<img src="images/image1.jpg" className="imagem" />
<div className="imagem-dividida">
<img
src="images/image2.jpg"
className="sub-imagem"
style={{ borderTopRightRadius: 40 }}
/>
<img
src="images/image4.jpg"
className="sub-imagem"
style={
{
borderBottomRightRadius: 40,
marginTop: 10
}
}
/>
</div>
</div>
<div className="repInfos">
<div>
<label htmlFor="" className="Valor">
{ this.value}
</label>
</div>
<div className="fotoContainer">
<label htmlFor="" style={{ fontSize: 25 }}>
Anfritrião
</label>
<a href="">
<img src="images/teste.png" className="fotoImage" alt="" />
</a>
<a href="">
<label htmlFor="" className="nomeAnfitriao">
{this.mainGuy}
</label>
</a>
</div>
</div>
<div className="repRate"></div>
</div>
</div>
<div className="repRate"></div>
</div>



</div>
)
</div>
)
}
} export default republica

0 comments on commit 8788636

Please sign in to comment.