All files / src/components/common/PermenantDrawer HandlePermanentDrawerData.tsx

0% Statements 0/15
0% Branches 0/5
0% Functions 0/1
0% Lines 0/15

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 17 18 19 20 21 22 23 24 25 26 27                                                     
import { PermanentDrawerTypes } from "../../../store/features/drawers/permanentDrawerTypes.ts";
import { useSelector } from "react-redux";
import { permanentViewSelector } from "../../../store/features/drawers/drawersSlice.ts";
import Timeline from "../../Playbooks/Timeline.js";
import TaskDetailsDrawer from "../../Playbooks/create/TaskDetailsDrawer.tsx";
import StepDetailsDrawer from "../PermanentDrawers/StepDetailsDrawer.tsx";
import ConditionDrawer from "../Drawers/ConditionDrawer.tsx";
 
function HandlePermanentDrawerData() {
  const permanentView = useSelector(permanentViewSelector);
 
  switch (permanentView) {
    case PermanentDrawerTypes.CONDITION:
      return <ConditionDrawer />;
    case PermanentDrawerTypes.STEP_DETAILS:
      return <StepDetailsDrawer />;
    case PermanentDrawerTypes.TASK_DETAILS:
      return <TaskDetailsDrawer />;
    case PermanentDrawerTypes.TIMELINE:
      return <Timeline />;
    default:
      return <div>No View Selected</div>;
  }
}
 
export default HandlePermanentDrawerData;