Log PUBLISH payload and post full route object

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Rami Bitar
2026-05-11 23:32:54 -04:00
parent 6b6be4f50c
commit 661eb99e94

View File

@@ -47,10 +47,10 @@ export default function App() {
);
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) {
window.parent.postMessage(
{ type: "PUBLISH", data: { data, route: route?.key } },
{ type: "PUBLISH", data: { data, route } },
"*",
);
}