CaesarCloudSync
RevisionBankCardLink First commit
3bc47cc
'use strict'
const e = React.createElement;
class Comp1 extends React.Component {
constructor(props) {
super(props);
//this.getallmagneuris = this.getallmagneuris.bind(this);
this.state = {quotas:[]}
}
componentDidMount() {
//window.addEventListener('load', this.handleLoad);
//this.getallmagneuris();
alert("Hi")
}
/*
async getallmagneuris(){
const companyname = "Google"
const company_password = "kya63amari"
const contributorsignup= await axios.post("https://caesarcoinbackend.onrender.com/quotapostersignin",{"company":companyname,"email":"amari.lawal05@gmail.com","password":company_password})
//console.log(contributorsignup)
if (contributorsignup.data.access_token == "Wrong password"){
let walletbalance= document.getElementById("walletbalance")
walletbalance.style = "position:absolute;left:20%;top:10%;"
walletbalance.innerHTML = `${companyname} incorrect password or username.`
}
else{
const config = {
headers: { Authorization: `Bearer ${contributorsignup.data.access_token}` }
};
const getlastblockchainresp = await axios.get("https://caesarcoinbackend.onrender.com/getallmagneturi",config)
//console.log(getlastblockchainresp.data.quotamagneturis)
this.setState( state => ({
quotas: state.quotas.concat(getlastblockchainresp.data.quotamagneturis)
}));
}
}*/
render () {
//console.log(this.state)
//const quotas = this.state //.quotas
console.log("hi")
return (
<div>
<h1>Quota files Contributed</h1>
</div>
)
}
}
// Find all DOM containers, and render our component into them.
var containers = document.querySelectorAll('.root-react')
console.log("test")
containers.forEach(domContainer => {
// Read the user ID from a data-* attribute.
const userid = domContainer.dataset.userid
// render the component into the DOM
ReactDOM.render(
e(Comp1, { userid: userid}),
domContainer
)
});