mirror of
https://github.com/Kong/insomnia
synced 2024-11-08 06:39:48 +00:00
pass dispatch to newCommand result (#5258)
This commit is contained in:
parent
4817b59d4e
commit
55d6733793
@ -8,7 +8,6 @@ import { selectActiveWorkspace } from '../redux/selectors';
|
||||
|
||||
export const useAppCommands = () => {
|
||||
const dispatch = useDispatch();
|
||||
const handleCommand = dispatch(newCommand);
|
||||
const activeWorkspace = useSelector(selectActiveWorkspace);
|
||||
|
||||
// Handle Application Commands
|
||||
@ -18,7 +17,7 @@ export const useAppCommands = () => {
|
||||
const command = `${parsed.hostname}${parsed.pathname}`;
|
||||
const args = JSON.parse(JSON.stringify(parsed.query));
|
||||
args.workspaceId = args.workspaceId || activeWorkspace?._id;
|
||||
handleCommand(command, args);
|
||||
newCommand(command, args)(dispatch);
|
||||
});
|
||||
}, [activeWorkspace?._id, handleCommand]);
|
||||
}, [activeWorkspace?._id, dispatch]);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user