Log PUBLISH payload and post full route object
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -47,10 +47,10 @@ export default function App() {
|
|||||||
);
|
);
|
||||||
|
|
||||||
const handlePublish = async (data: any, route?: { key: string }) => {
|
const handlePublish = async (data: any, route?: { key: string }) => {
|
||||||
console.log("PUBLISH", { data, route: route?.key });
|
console.log({ type: "PUBLISH", data: { data, route: JSON.stringify(route) } });
|
||||||
if (typeof window !== "undefined" && window.parent !== window) {
|
if (typeof window !== "undefined" && window.parent !== window) {
|
||||||
window.parent.postMessage(
|
window.parent.postMessage(
|
||||||
{ type: "PUBLISH", data: { data, route: route?.key } },
|
{ type: "PUBLISH", data: { data, route } },
|
||||||
"*",
|
"*",
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user