This repository has been archived on 2024-11-29. You can view files and clone it, but cannot push or open issues or pull requests.
2021-01-27 22:56:32 -05:00

40 lines
1.1 KiB
JavaScript

import React from "react";
import { callAPI } from "../../../actions/API";
export const CredChecker = (props) => {
const sendit = () => {
let values = {
hostname: document.getElementById("Host").value,
username: document.getElementById("User").value,
password: document.getElementById("Pass").value,
};
callAPI.post("/checkcpanel/", values).then((resp) => {
props.credCallback([resp, values]);
});
console.log();
};
return (
<div>
<div className="row">
<div className="col s3">
<label htmlFor="Host">Hostname</label>
<input id="Host"></input>
</div>
<div className="col s3">
<label htmlFor="User">Username</label>
<input id="User"></input>
</div>
<div className="col s3">
<label htmlFor="Pass">Password</label>
<input id="Pass"></input>
</div>
</div>
<div className="row">
<button className="btn btn-secondary" onClick={sendit}>
Check Deets homie
</button>
</div>
</div>
);
};