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(() => {
|
||||
(async () => {
|
||||
if (isNotLogin) {
|
||||
setStaticActions(getGlobalActions(navBarTree));
|
||||
setActions(staticActions);
|
||||
}
|
||||
})();
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
if (isNotLogin) {
|
||||
const staticActionsResp = getGlobalActions(navBarTree);
|
||||
setStaticActions(staticActionsResp);
|
||||
setActions([...staticActionsResp]);
|
||||
}
|
||||
}, [isNotLogin, navBarTree]);
|
||||
|
||||
useEffect(() => {
|
||||
|
Loading…
Reference in New Issue
Block a user