diff --git a/src/apps/content-editor/src/app/views/ItemEdit/FreestyleWrapper.tsx b/src/apps/content-editor/src/app/views/ItemEdit/FreestyleWrapper.tsx index e58728ade1..4bdd5ec16f 100644 --- a/src/apps/content-editor/src/app/views/ItemEdit/FreestyleWrapper.tsx +++ b/src/apps/content-editor/src/app/views/ItemEdit/FreestyleWrapper.tsx @@ -2,8 +2,9 @@ import Cookies from "js-cookie"; import { MutableRefObject, forwardRef, useRef, useState } from "react"; import { useSelector } from "react-redux"; import { AppState } from "../../../../../../shell/store/types"; -import { useParams } from "react-router"; +import { useHistory, useParams } from "react-router"; import { withDAM } from "../../../../../../shell/components/withDAM"; +import { Button, Dialog } from "@mui/material"; const IframeComponent = forwardRef( (props: any, ref: MutableRefObject) => { @@ -19,6 +20,7 @@ export const FreestyleWrapper = () => { itemZUID: string; }>(); const iframeRef = useRef(null); + const history = useHistory(); const instance = useSelector((state: AppState) => state.instance); const [sessionToken] = useState(Cookies.get(CONFIG.COOKIE_NAME)); @@ -39,14 +41,30 @@ export const FreestyleWrapper = () => { ); }; + const handleFreestyleExit = () => { + history.push(`/content/${modelZUID}/${itemZUID}`); + }; + return ( - + + + + ); };