fix: update currentflow to be fetched from Flow Store for icon to be rendered correctly (#7354)
* Updated current flow to be fetched from FlowStore * Changed setPlaygroundPage's place because of console error
This commit is contained in:
parent
cac85c62b4
commit
57524d538c
2 changed files with 4 additions and 8 deletions
|
|
@ -67,10 +67,8 @@ export default function IOModal({
|
|||
const currentFlowId = playgroundPage
|
||||
? uuidv5(`${clientId}_${realFlowId}`, uuidv5.DNS)
|
||||
: realFlowId;
|
||||
const currentFlow = useFlowsManagerStore((state) => state.currentFlow);
|
||||
const currentFlow = useFlowStore((state) => state.currentFlow);
|
||||
const [sidebarOpen, setSidebarOpen] = useState(true);
|
||||
const setPlaygroundPage = useFlowStore((state) => state.setPlaygroundPage);
|
||||
setPlaygroundPage(!!playgroundPage);
|
||||
|
||||
const { mutate: deleteSessionFunction } = useDeleteMessages();
|
||||
const [visibleSession, setvisibleSession] = useState<string | undefined>(
|
||||
|
|
|
|||
|
|
@ -3,17 +3,13 @@ import { useCustomNavigate } from "@/customization/hooks/use-custom-navigate";
|
|||
import { track } from "@/customization/utils/analytics";
|
||||
import IOModal from "@/modals/IOModal/new-modal";
|
||||
import useFlowStore from "@/stores/flowStore";
|
||||
import { useStoreStore } from "@/stores/storeStore";
|
||||
import { useUtilityStore } from "@/stores/utilityStore";
|
||||
import { CookieOptions, getCookie, setCookie } from "@/utils/utils";
|
||||
import { useEffect } from "react";
|
||||
import { useParams } from "react-router-dom";
|
||||
import { v4 as uuid } from "uuid";
|
||||
import { getComponent } from "../../controllers/API";
|
||||
import useFlowsManagerStore from "../../stores/flowsManagerStore";
|
||||
import cloneFLowWithParent, {
|
||||
getInputsAndOutputs,
|
||||
} from "../../utils/storeUtils";
|
||||
import { getInputsAndOutputs } from "../../utils/storeUtils";
|
||||
export default function PlaygroundPage() {
|
||||
const setCurrentFlow = useFlowsManagerStore((state) => state.setCurrentFlow);
|
||||
const currentSavedFlow = useFlowsManagerStore((state) => state.currentFlow);
|
||||
|
|
@ -26,6 +22,7 @@ export default function PlaygroundPage() {
|
|||
|
||||
const currentFlowId = useFlowsManagerStore((state) => state.currentFlowId);
|
||||
const setIsLoading = useFlowsManagerStore((state) => state.setIsLoading);
|
||||
const setPlaygroundPage = useFlowStore((state) => state.setPlaygroundPage);
|
||||
|
||||
async function getFlowData() {
|
||||
try {
|
||||
|
|
@ -56,6 +53,7 @@ export default function PlaygroundPage() {
|
|||
|
||||
useEffect(() => {
|
||||
if (id) track("Playground Page Loaded", { flowId: id });
|
||||
setPlaygroundPage(true);
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue