mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Remove async, set static actions from response and not state variable (#51556)
This commit is contained in:
parent
40e72c6de3
commit
73ceb25035
@ -47,13 +47,11 @@ export const CommandPalette = () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
(async () => {
|
if (isNotLogin) {
|
||||||
if (isNotLogin) {
|
const staticActionsResp = getGlobalActions(navBarTree);
|
||||||
setStaticActions(getGlobalActions(navBarTree));
|
setStaticActions(staticActionsResp);
|
||||||
setActions(staticActions);
|
setActions([...staticActionsResp]);
|
||||||
}
|
}
|
||||||
})();
|
|
||||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
||||||
}, [isNotLogin, navBarTree]);
|
}, [isNotLogin, navBarTree]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
Loading…
Reference in New Issue
Block a user