feat: Prevent users from starting levels that they did not reach yet
This commit is contained in:
@@ -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)),
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user