mirror of
https://github.com/webstudio-is/webstudio.git
synced 2026-11-09 22:14:29 +09:00
21 lines
415 B
TypeScript
21 lines
415 B
TypeScript
import { useEffect } from "react";
|
|
import { publish } from "~/shared/pubsub";
|
|
|
|
declare module "~/shared/pubsub" {
|
|
export interface PubsubMap {
|
|
canvasWidth: number;
|
|
}
|
|
}
|
|
|
|
export const ErrorMessage = ({ message }: { message: string }) => {
|
|
useEffect(() => {
|
|
publish({ type: "canvasWidth", payload: 600 });
|
|
}, []);
|
|
return (
|
|
<div>
|
|
<h1>Error</h1>
|
|
<pre>{message}</pre>
|
|
</div>
|
|
);
|
|
};
|