Added Dashboard
This commit is contained in:
		@@ -1,11 +1,35 @@
 | 
				
			|||||||
import React from "react";
 | 
					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{
 | 
					export default class Dashboard extends React.Component{
 | 
				
			||||||
    constructor(props) {
 | 
					    constructor(props) {
 | 
				
			||||||
        super(props);
 | 
					        super(props);
 | 
				
			||||||
 | 
					        this.state = {
 | 
				
			||||||
 | 
					            displayedMatches: [],
 | 
				
			||||||
 | 
					        };
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    async getFirstName(){
 | 
				
			||||||
 | 
					        let user = await apiClient.get("/user");
 | 
				
			||||||
 | 
					        return user.firstName;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    render() {
 | 
					    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>
 | 
				
			||||||
 | 
					            
 | 
				
			||||||
 | 
					        );
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
							
								
								
									
										5
									
								
								sports-matcher/client/src/styles/Dashboard.css
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								sports-matcher/client/src/styles/Dashboard.css
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,5 @@
 | 
				
			|||||||
 | 
					.w-50{
 | 
				
			||||||
 | 
					    margin-top: 5%;
 | 
				
			||||||
 | 
					    margin-left: 25%;
 | 
				
			||||||
 | 
					    margin-right: 25%;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
		Reference in New Issue
	
	Block a user