Added Dashboard

This commit is contained in:
Piyush Sharma 2022-04-05 13:16:09 -04:00
parent 2831e2a39e
commit 879cbac17f
2 changed files with 31 additions and 2 deletions

View File

@ -1,11 +1,35 @@
import React from "react";
// import { apiClient } from "../utils/httpClients";
import { Button, InputGroup, FormControl } from "react-bootstrap";
import "../styles/Dashboard.css";
import { apiClient } from "../utils/httpClients";
export default class Dashboard extends React.Component{
constructor(props) {
super(props);
this.state = {
displayedMatches: [],
};
}
async getFirstName(){
let user = await apiClient.get("/user");
return user.firstName;
}
render() {
return(<h1>Dashboard</h1>);
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>
);
}
}

View File

@ -0,0 +1,5 @@
.w-50{
margin-top: 5%;
margin-left: 25%;
margin-right: 25%;
}