All files / src/store/features/playbook/slices resetState.ts

30.76% Statements 4/13
100% Branches 0/0
0% Functions 0/1
25% Lines 3/12

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16  1x 1x   1x                      
import { PlaybookUIState } from "../../../../types/index.ts";
import { initialState } from "../initialState.ts";
import { PermanentDrawerTypes } from "../../drawers/permanentDrawerTypes.ts";
 
export const resetState = (state: PlaybookUIState) => {
  state.currentPlaybook = initialState.currentPlaybook;
  state.currentVisibleTask = undefined;
  state.executionId = undefined;
  state.isOnPlaybookPage = false;
  state.meta = undefined;
  state.permanentView = PermanentDrawerTypes.DEFAULT;
  state.playbooks = [];
  state.shouldScroll = false;
  state.zoomLevel = 0.75;
};