From 94cefea3f6c3999b0364b22a81ade49e28135011 Mon Sep 17 00:00:00 2001
From: bobzel <zzzman@gmail.com>
Date: Wed, 6 Dec 2023 23:36:00 -0500
Subject: went back to supporting multiple arcs explicilty

---
 .../collectionFreeForm/CollectionFreeFormInfoState.tsx      | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

(limited to 'src/client/views/collections/collectionFreeForm/CollectionFreeFormInfoState.tsx')

diff --git a/src/client/views/collections/collectionFreeForm/CollectionFreeFormInfoState.tsx b/src/client/views/collections/collectionFreeForm/CollectionFreeFormInfoState.tsx
index 3c19ef4e9..9090d0ea5 100644
--- a/src/client/views/collections/collectionFreeForm/CollectionFreeFormInfoState.tsx
+++ b/src/client/views/collections/collectionFreeForm/CollectionFreeFormInfoState.tsx
@@ -3,10 +3,13 @@ import { observer } from 'mobx-react';
 import './CollectionFreeFormView.scss';
 import React = require('react');
 
+export type infoArc = {
+    events: () => any;
+    actions: (arg?: any) => any;
+};
 export type infoState = {
     Message: string;
-    Events: () => any;
-    Actions: (arg?: any) => any;
+    Arcs: infoArc[];
 };
 
 export interface CollectionFreeFormInfoStateProps {
@@ -15,10 +18,10 @@ export interface CollectionFreeFormInfoStateProps {
 
 @observer
 export class CollectionFreeFormInfoState extends React.Component<CollectionFreeFormInfoStateProps> {
-    _disposer: IReactionDisposer | undefined;
+    _disposers: IReactionDisposer[] = [];
 
-    clearState = () => this._disposer?.();
-    initState = () => (this._disposer = reaction(this.props.state.Events, this.props.state.Actions, { fireImmediately: true }));
+    clearState = () => this._disposers.map(disposer => disposer());
+    initState = () => (this._disposers = this.props.state.Arcs.map(arc => reaction(arc.events, arc.actions, { fireImmediately: true })));
 
     componentDidMount(): void {
         this.initState();
-- 
cgit v1.2.3-70-g09d2

