({
+ id: crypto.randomUUID(),
+ diagramRefreshedEventPayload: null,
+ complete: false,
+ message: '',
+ });
- const { complete, payload } = useDiagramSubscription(editingContextId, diagramId);
+ const { complete, payload } = useDiagramSubscription(editingContextId, diagramId);
- useEffect(() => {
- if (isDiagramRefreshedEventPayload(payload)) {
- setState((prevState) => ({ ...prevState, diagramRefreshedEventPayload: payload }));
- }
- }, [payload]);
-
- if (complete) {
- return (
-
- The representation is not available anymore
-
- );
- }
-
- if (!state.diagramRefreshedEventPayload) {
- return ;
+ useEffect(() => {
+ if (isDiagramRefreshedEventPayload(payload)) {
+ setState((prevState) => ({ ...prevState, diagramRefreshedEventPayload: payload }));
}
+ }, [payload]);
+ if (complete) {
return (
-
-
-
-
-
-
-
-
-
+
+ The representation is not available anymore
+
);
}
-);
+
+ if (!state.diagramRefreshedEventPayload) {
+ return ;
+ }
+
+ return (
+
+
+
+
+
+
+
+ );
+});