fix: Implement more APIs
This commit is contained in:
@@ -1,8 +1,13 @@
|
||||
import { connect } from "react-redux";
|
||||
|
||||
import { setNextLevel, setDashboardNLLoading, setTopTen, setDashboardTTLoading } from "../actions";
|
||||
import {
|
||||
setNextLevel, setDashboardNLLoading, setTopTen, setDashboardTTLoading,
|
||||
setDashboardLRLoading, setLastReview,
|
||||
} from "../actions";
|
||||
|
||||
import { ILevel } from "../models/level";
|
||||
import { ILearner } from "../models/learner";
|
||||
import { IReviewMetadata } from "../models/review";
|
||||
|
||||
import DashboardPage from "../pages/dashboard";
|
||||
|
||||
@@ -12,6 +17,8 @@ const mapStateToProps = state => {
|
||||
loadingNextLevel: state.dashboard.loadingNL,
|
||||
loadingTopTen: state.dashboard.loadingTT,
|
||||
topTen: state.topTen,
|
||||
loadingLastReview: state.dashboard.loadingLR,
|
||||
lastReview: state.lastReview,
|
||||
};
|
||||
};
|
||||
const mapDispatchToProps = dispatch => {
|
||||
@@ -20,6 +27,8 @@ const mapDispatchToProps = dispatch => {
|
||||
setNextLevel: (level: ILevel) => dispatch(setNextLevel(level)),
|
||||
setTopTen: (topTen: ILearner[]) => dispatch(setTopTen(topTen)),
|
||||
setLoadingTT: (state: boolean) => dispatch(setDashboardTTLoading(state)),
|
||||
setLastReview: (review: IReviewMetadata) => dispatch(setLastReview(review)),
|
||||
setLoadingLR: (state: boolean) => dispatch(setDashboardLRLoading(state)),
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user