Skip to content

Commit b294990

Browse files
expose logout action
1 parent 21c7da7 commit b294990

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

client/packages/lowcoder/src/comps/hooks/utilsComp.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@ import { saveDataAsFile } from "../../util/fileUtils";
77
import { openApp, recordToSearchStr } from "../../util/appUtils";
88
import { trans } from "i18n";
99
import { logoutAction } from "redux/reduxActions/userActions";
10-
import { useDispatch } from "react-redux";
11-
import { useCallback } from "react";
12-
10+
import StoreRegistry from "@lowcoder-ee/redux/store/storeRegistry";
1311

1412
const UtilsCompBase = simpleMultiComp({});
1513
export let UtilsComp = withExposingConfigs(UtilsCompBase, []);
@@ -118,7 +116,9 @@ UtilsComp = withMethodExposing(UtilsComp, [
118116
params: [],
119117
},
120118
execute: (comp, params) => {
121-
logoutAction({})
119+
StoreRegistry.getStore().dispatch(
120+
logoutAction({})
121+
);
122122
},
123123
},
124124
]);

0 commit comments

Comments
 (0)