Implement creator studio and upload updates
This commit is contained in:
26
resources/js/render-frame.jsx
Normal file
26
resources/js/render-frame.jsx
Normal file
@@ -0,0 +1,26 @@
|
||||
/**
|
||||
* render-frame.jsx — standalone React entry for Playwright card rendering.
|
||||
*
|
||||
* Reads card data from window globals injected by NovaCardRenderFrameController
|
||||
* and mounts just the NovaCardCanvasPreview component with no editor chrome.
|
||||
* The Playwright script screenshots [data-card-canvas] after this mounts.
|
||||
*/
|
||||
import React from 'react'
|
||||
import { createRoot } from 'react-dom/client'
|
||||
import NovaCardCanvasPreview from './components/nova-cards/NovaCardCanvasPreview'
|
||||
|
||||
const card = window.__NOVA_CARD__ || {}
|
||||
const fonts = window.__NOVA_CARD_FONTS__ || []
|
||||
|
||||
const mount = document.getElementById('card-render-mount')
|
||||
if (mount) {
|
||||
createRoot(mount).render(
|
||||
<NovaCardCanvasPreview
|
||||
card={card}
|
||||
fonts={fonts}
|
||||
editable={false}
|
||||
renderMode={true}
|
||||
className="w-full"
|
||||
/>,
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user