Feat/SW-3031 imagevault updates

* chore(SW-3031): Updated dependencies
* feat(SW-3031): Added Imagevault Id to title and updated delete functionality

Approved-by: Michael Zetterberg
This commit is contained in:
Erik Tiekstra
2025-06-18 13:14:02 +00:00
parent b1aaa6fd56
commit 7e64becb40
20 changed files with 5450 additions and 3072 deletions

View File

@@ -1,10 +1,10 @@
import UiLocation from "@contentstack/app-sdk/dist/src/uiLocation"
import { useEffect, useState } from "react"
import { useEffect, useRef, useState } from "react"
export class SDKLoadingError extends Error {}
export default function useApp() {
const modalElementId = "field"
const ref = useRef<HTMLDivElement>(null)
const [, setError] = useState()
const [sdk, setSdk] = useState<UiLocation>()
const [config, setConfig] = useState<Record<string, string>>()
@@ -20,8 +20,7 @@ export default function useApp() {
const config = await initSdk.getConfig()
setConfig(config)
const iframeWrapperRef = document.getElementById(modalElementId)
window.iframeRef = iframeWrapperRef
window.iframeRef = ref.current
window.postRobot = initSdk.postRobot
} catch (e) {
let err: Error
@@ -43,6 +42,6 @@ export default function useApp() {
return {
sdk,
config,
modalElementId,
ref,
}
}