feat: Prevent users from starting levels that they did not reach yet

This commit is contained in:
Alexander Polynomdivision committed 2018-10-02 17:52:07 +02:00
1 parent cee5680a6a
commit 5361d1bab5
4 files changed
+109 -62

No files matched your search

+5 -1
View File
@@ -1,6 +1,8 @@
import { connect } from "react-redux";
import { setLevelListLoading, setLevels } from "../actions";
import {
setLevelListLoading, setLevels, setLevelListSnackbar
} from "../actions";
import { ILevel } from "../models/level";
@@ -11,12 +13,14 @@ const mapStateToProps = state => {
levels: state.levels,
loading: state.levelList.loading,
user: state.user,
snackbar: state.levelList.snackbar,
};
};
const mapDispatchToProps = dispatch => {
return {
setLoading: (state: boolean) => dispatch(setLevelListLoading(state)),
setLevels: (levels: ILevel[]) => dispatch(setLevels(levels)),
setSnackbar: (state: boolean) => dispatch(setLevelListSnackbar(state)),
};
};