fix: react state never updated when tour opened
This commit is contained in:
@@ -16,6 +16,7 @@ import {
|
||||
endCourseHomeTour,
|
||||
endCoursewareTour,
|
||||
fetchTourData,
|
||||
openCourseHomeTour,
|
||||
} from './data';
|
||||
|
||||
const ProductTours = ({
|
||||
@@ -164,7 +165,7 @@ const ProductTours = ({
|
||||
is_staff: administrator,
|
||||
});
|
||||
dispatch(closeNewUserCourseHomeModal());
|
||||
setIsNewUserCourseHomeTourEnabled(true);
|
||||
dispatch(openCourseHomeTour());
|
||||
}}
|
||||
/>
|
||||
</>
|
||||
|
||||
@@ -3,6 +3,7 @@ export {
|
||||
endCourseHomeTour,
|
||||
endCoursewareTour,
|
||||
fetchTourData,
|
||||
openCourseHomeTour,
|
||||
} from './thunks';
|
||||
|
||||
export { reducer } from './slice';
|
||||
|
||||
@@ -6,12 +6,17 @@ import {
|
||||
disableCoursewareTour,
|
||||
disableNewUserCourseHomeModal,
|
||||
setTourData,
|
||||
launchCourseHomeTour,
|
||||
} from './slice';
|
||||
|
||||
export function closeNewUserCourseHomeModal() {
|
||||
return async (dispatch) => dispatch(disableNewUserCourseHomeModal());
|
||||
}
|
||||
|
||||
export function openCourseHomeTour() {
|
||||
return async (dispatch) => dispatch(launchCourseHomeTour());
|
||||
}
|
||||
|
||||
export function endCourseHomeTour(username) {
|
||||
return async (dispatch) => {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user