Final changes.
This commit is contained in:
@@ -4,6 +4,9 @@ import "../styles/Dashboard.css";
|
||||
import { apiClient } from "../utils/httpClients.js";
|
||||
import MatchInfoCardDisplay from "../components/MatchInfoCardDisplay";
|
||||
import SportInfoCardDisplay from "../components/SportInfoCardDisplay";
|
||||
import { globalContext } from "../context";
|
||||
import { needUser } from "../utils/routing";
|
||||
|
||||
export default class Dashboard extends React.Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
@@ -15,7 +18,10 @@ export default class Dashboard extends React.Component {
|
||||
};
|
||||
}
|
||||
|
||||
static contextType = globalContext;
|
||||
|
||||
async componentDidMount() {
|
||||
await needUser(this.context.navigate);
|
||||
await this.latestMatches();
|
||||
await this.availableSports();
|
||||
}
|
||||
|
Reference in New Issue
Block a user