- {showReset && (
-
- )}
+
+
+ {showReset && (
+
+ )}
- {hasPrev && (
-
- )}
+ {hasPrev && (
+
+ )}
+
+ {children ? (
+ children
+ ) : (
+
+ )}
+
+
+
+
+ {isMounted &&
+ createPortal(
+
+
+ {showReset && (
+
+ )}
+
+ {hasPrev && (
+
+ )}
- {children ? (
- children
- ) : (
-
+ {children ? (
+ children
+ ) : (
+
+ )}
+
+
,
+ document.body
)}
-
>
)
}
diff --git a/packages/create-dao-ui/src/components/ReviewAndDeploy/PreviewArtwork.tsx b/packages/create-dao-ui/src/components/ReviewAndDeploy/PreviewArtwork.tsx
index 36e359f9d..114af18b6 100644
--- a/packages/create-dao-ui/src/components/ReviewAndDeploy/PreviewArtwork.tsx
+++ b/packages/create-dao-ui/src/components/ReviewAndDeploy/PreviewArtwork.tsx
@@ -1,62 +1,23 @@
-import { AnimatedModal } from '@buildeross/ui/Modal'
-import { Playground } from '@buildeross/ui/Playground'
-import { flatten } from '@buildeross/utils/helpers'
-import { Button } from '@buildeross/zord'
-import React, { BaseSyntheticEvent } from 'react'
+import { Box, Flex } from '@buildeross/zord'
import { useFormStore } from '../../stores'
export const PreviewArtwork: React.FC = () => {
const { ipfsUpload, orderedLayers } = useFormStore()
- const images = React.useMemo(() => {
- if (!ipfsUpload) return
-
- const entries = Object.entries(ipfsUpload)
- const uploads = entries.reduce((acc: any[] = [], cv) => {
- acc.push(cv[1])
-
- return acc
- }, [])
-
- return uploads.reduce((acc: any[] = [], cv) => {
- if (!cv || typeof cv !== 'object') return
- const image = flatten(cv)
- acc.push({
- cid: image.cid,
- name: image.name,
- trait: image.trait,
- uri: image.uri,
- url: image.url,
- content: cv.content,
- })
-
- return acc
- }, [])
- }, [ipfsUpload])
-
- const [isOpenModal, setIsOpenModal] = React.useState