hunk.code_window: import { useDispatch } from "react-redux";
   import { useHistory, useParams } from "react-router-dom";
   import { noop } from "lodash";
  
hunk.labels: replace keep keep keep
hunk.after_edit: import { useDispatch, useSelector } from "react-redux";
  
hunk.file_path: app/client/src/pages/Editor/EditorAppName/NavigationMenuData.ts
hunk.type: replace
file: import { ExplorerURLParams } from "../helpers";
  import { BUILDER_PAGE_URL } from "constants/routes";
  import history from "utils/history";
  
  export const navigateToCanvas = (
    params: ExplorerURLParams,
    currentPath: string,
    widgetPageId: string,
    widgetId: string,
  ) => {
    const canvasEditorURL = `${BUILDER_PAGE_URL(
      params.applicationId,
      widgetPageId,
    )}`;
    if (currentPath !== canvasEditorURL) {
      history.push(`${canvasEditorURL}#${widgetId}`);
    }
  };
  