Skip to content

Commit 005c7f6

Browse files
authored
Restore packages/uikit-workshop/src/scripts/actions/app.js
1 parent 9dd3d47 commit 005c7f6

File tree

1 file changed

+18
-22
lines changed
  • packages/uikit-workshop/src/scripts/actions

1 file changed

+18
-22
lines changed

packages/uikit-workshop/src/scripts/actions/app.js

Lines changed: 18 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,15 @@ export const UPDATE_CURRENT_URL = 'UPDATE_CURRENT_URL';
99
export const UPDATE_CURRENT_PATTERN = 'UPDATE_CURRENT_PATTERN';
1010
export const IS_VIEWALL_PAGE = 'IS_VIEWALL_PAGE';
1111

12-
export const updateCurrentPattern = (currentPattern) => (
13-
dispatch,
14-
getState
15-
) => {
16-
if (getState().app.currentPattern !== currentPattern) {
17-
dispatch({
18-
type: UPDATE_CURRENT_PATTERN,
19-
currentPattern,
20-
});
21-
}
22-
};
12+
export const updateCurrentPattern =
13+
(currentPattern) => (dispatch, getState) => {
14+
if (getState().app.currentPattern !== currentPattern) {
15+
dispatch({
16+
type: UPDATE_CURRENT_PATTERN,
17+
currentPattern,
18+
});
19+
}
20+
};
2321

2422
export const updateCurrentUrl = (currentUrl) => (dispatch, getState) => {
2523
if (getState().app.currentUrl !== currentUrl) {
@@ -75,17 +73,15 @@ export const updateDrawerState = (opened) => (dispatch, getState) => {
7573
}
7674
};
7775

78-
export const updateDrawerAnimationState = (drawerIsAnimating) => (
79-
dispatch,
80-
getState
81-
) => {
82-
if (getState().app.drawerIsAnimating !== drawerIsAnimating) {
83-
dispatch({
84-
type: UPDATE_DRAWER_ANIMATION_STATE,
85-
drawerIsAnimating,
86-
});
87-
}
88-
};
76+
export const updateDrawerAnimationState =
77+
(drawerIsAnimating) => (dispatch, getState) => {
78+
if (getState().app.drawerIsAnimating !== drawerIsAnimating) {
79+
dispatch({
80+
type: UPDATE_DRAWER_ANIMATION_STATE,
81+
drawerIsAnimating,
82+
});
83+
}
84+
};
8985

9086
export const updateDrawerHeight = (height) => (dispatch, getState) => {
9187
if (getState().app.drawerHeight !== height) {

0 commit comments

Comments
 (0)