35 lines
1.0 KiB
JavaScript
Raw Normal View History

2022-04-05 02:19:08 -04:00
import React from "react";
2022-04-05 13:16:09 -04:00
import { Button, InputGroup, FormControl } from "react-bootstrap";
import "../styles/Dashboard.css";
import { apiClient } from "../utils/httpClients";
2022-04-05 02:19:08 -04:00
export default class Dashboard extends React.Component{
constructor(props) {
super(props);
2022-04-05 13:16:09 -04:00
this.state = {
displayedMatches: [],
};
}
async getFirstName(){
let user = await apiClient.get("/user");
return user.firstName;
2022-04-05 02:19:08 -04:00
}
render() {
2022-04-05 13:16:09 -04:00
return(
<React.Fragment>
<h1>Welcome {this.getFirstName()}</h1>
<InputGroup className="w-50">
<FormControl
placeholder="Search for Matches"
aria-label="Search Bar"
aria-describedby="basic-addon2"
/>
<Button variant="outline-secondary" id="button-addon2">
Search
</Button>
</InputGroup>
</React.Fragment>
);
2022-04-05 02:19:08 -04:00
}
}