Raphaël Bosi
2025-01-24 16:10:02 +01:00
committed by GitHub
parent 29df6e64a0
commit ff41768e8f
15 changed files with 438 additions and 221 deletions

View File

@ -0,0 +1,19 @@
import { useCopyContextStoreStates } from '@/command-menu/hooks/useCopyContextStoreAndActionMenuStates';
import { useResetContextStoreStates } from '@/command-menu/hooks/useResetContextStoreStates';
export const useResetPreviousCommandMenuContext = () => {
const { copyContextStoreStates } = useCopyContextStoreStates();
const { resetContextStoreStates } = useResetContextStoreStates();
const resetPreviousCommandMenuContext = () => {
copyContextStoreStates({
instanceIdToCopyFrom: 'command-menu-previous',
instanceIdToCopyTo: 'command-menu',
});
resetContextStoreStates('command-menu-previous');
};
return {
resetPreviousCommandMenuContext,
};
};