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:
@@ -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,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user