-
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
1 parent
e42b076
commit cf78ac6
Showing
7 changed files
with
87 additions
and
24 deletions.
There are no files selected for viewing
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
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,21 +1,50 @@ | ||
import React, {Component} from 'react'; | ||
import Button from 'react-bootstrap/Button' | ||
import CountUp from 'react-countup'; | ||
import "../styles/HomeStyle.css" | ||
|
||
export default function Home(props) { | ||
return( | ||
<React.Fragment> | ||
<h3 className="centerTitle">How much is your data really worth?</h3> | ||
<h6 className="centerSubtitle">Crowdfunding data valuations, for a safer, friendlier and more secure tomorrow.</h6> | ||
<div className="buttons"> | ||
<Button className="buttonStyle" onClick={props.priceHandler}>Price my data!</Button> | ||
</div> | ||
<p className="readMore">Read more about this project <a href="#">here</a></p> | ||
<p style={{position:"absolute", bottom:"5px", textAlign:"left", fontSize:"0.8rem", marginLeft:"2vw"}}>By using us to price your data, you agree to our <a href="https://github.com/raghavmecheri/PriceMyDataDocuments/blob/master/TOC.md" target="_blank" style={{ | ||
color: "#ffffff", | ||
textDecoration: "underline" | ||
}}>terms and conditions</a></p> | ||
<Button className="circularButton">i</Button> | ||
</React.Fragment> | ||
); | ||
export default class Home extends Component { | ||
|
||
constructor(props) { | ||
super(props); | ||
this.state = { | ||
users:0 | ||
} | ||
} | ||
|
||
componentDidMount() { | ||
const endpoint = "./fetchUserCount"; | ||
fetch(endpoint, { | ||
method: 'POST', | ||
headers:{ | ||
'Content-Type': 'application/json' | ||
}, | ||
}).then(res => res.json()).then(response => { | ||
let {count} = response; | ||
console.log(count); | ||
this.setState({users:count}) | ||
}) | ||
.catch( | ||
error => console.log(error) | ||
); | ||
} | ||
|
||
render() { | ||
let {users} = this.state; | ||
return( | ||
<React.Fragment> | ||
<h3 className="centerTitle">How much is your data really worth?</h3> | ||
<h6 className="centerSubtitle">Crowdfunding data valuations, for a safer, friendlier and more secure tomorrow.</h6> | ||
<div className="buttons"> | ||
<Button className="buttonStyle" onClick={this.props.priceHandler}>Price my data</Button> | ||
</div> | ||
<p className="readMore">Read more about this project <a href="#">here</a></p> | ||
<p style={{position:"absolute", bottom:"5px", textAlign:"left", fontSize:"0.8rem", marginLeft:"2vw"}}>By using us to price your data, you agree to our <a href="https://github.com/raghavmecheri/PriceMyDataDocuments/blob/master/TOC.md" target="_blank" style={{ | ||
color: "#ffffff", | ||
textDecoration: "underline" | ||
}}>terms and conditions</a></p> | ||
<CountUp className="counter" delay={2} end={users} prefix="Users: "/> | ||
</React.Fragment> | ||
); | ||
} | ||
} |
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