Post publish message before delay in handlePublish
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -47,14 +47,14 @@ export default function App() {
|
||||
);
|
||||
|
||||
const handlePublish = async (data: any, route?: { key: string }) => {
|
||||
await new Promise((resolve) => setTimeout(resolve, 1000));
|
||||
if (typeof window !== "undefined" && window.parent !== window) {
|
||||
window.parent.postMessage(
|
||||
{ type: "PUBLISH", data: { data, route: route?.key } },
|
||||
"*",
|
||||
);
|
||||
}
|
||||
}
|
||||
await new Promise((resolve) => setTimeout(resolve, 1000));
|
||||
};
|
||||
|
||||
const plugins = useMemo(
|
||||
() => [createTailwindCdnPlugin()],
|
||||
|
||||
Reference in New Issue
Block a user