-
Notifications
You must be signed in to change notification settings - Fork 401
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: puck context missing from preview render #357
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@4leite is attempting to deploy a commit to the Measured Team on Vercel. A member of the Team first needs to authorize it. |
export function Render< | ||
UserConfig extends Config<any, any, any> = Config<any, any, any> | ||
>({ config, data }: { config: UserConfig; data: Data }) { | ||
export function Render<UserConfig extends Config = Config>({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem is it widens the type (effectively returning any) which is probably what fixed your issue, but it means that the issue below snuck in because it wasn't strongly typed any more.
@@ -27,7 +37,7 @@ export const Preview = ({ id = "puck-preview" }: { id?: string }) => { | |||
}} | |||
style={{ zoom: disableZoom ? 1 : 0.75 }} | |||
> | |||
<Page dispatch={dispatch} state={state} {...rootProps}> | |||
<Page {...rootProps}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dispatch
and state
were kept here to retain backwards compatibility with plugins from v0.12.0, before it was changed in v0.13.0.
I think I'd rather retain these for now, but we should probably mark them as // DEPRECATED
so we remember to pull them out during a breaking change release.
No description provided.