Skip to content

Commit

Permalink
fix: Persist portal state behind node modal (#3863)
Browse files Browse the repository at this point in the history
  • Loading branch information
DafyddLlyr authored Oct 29, 2024
1 parent 18ac5a9 commit 864b019
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions editor.planx.uk/src/pages/FlowEditor/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import ButtonGroup from "@mui/material/ButtonGroup";
import { styled } from "@mui/material/styles";
import { HEADER_HEIGHT_EDITOR } from "components/Header/Header";
import React, { useRef } from "react";
import { useCurrentRoute } from "react-navi";
import { rootFlowPath } from "routes/utils";

import Flow from "./components/Flow";
import { ToggleDataFieldsButton } from "./components/FlowEditor/ToggleDataFieldsButton";
Expand Down Expand Up @@ -40,8 +40,8 @@ const EditorVisualControls = styled(ButtonGroup)(({ theme }) => ({
}));

const FlowEditor = () => {
const [flow, ...breadcrumbs] =
useCurrentRoute().url.pathname.split("/").at(-1)?.split(",") || [];
const flowPath = rootFlowPath(true).split("/")[2];
const [flow, ...breadcrumbs] = flowPath.split(",");

const scrollContainerRef = useRef<HTMLDivElement>(null);
useScrollControlsAndRememberPosition(scrollContainerRef);
Expand Down

0 comments on commit 864b019

Please sign in to comment.