From 9d48c95e5a556f5be4abde83d9443e384a33197c Mon Sep 17 00:00:00 2001
From: Eric <ericmabr@gmail.com>
Date: Mon, 10 Jul 2023 14:26:37 -0400
Subject: Location metadata synced and reactions working

---
 src/client/views/nodes/MapBox/MapPushpinBox.tsx | 38 +++++++++++++++++++++++++
 1 file changed, 38 insertions(+)
 create mode 100644 src/client/views/nodes/MapBox/MapPushpinBox.tsx

(limited to 'src/client/views/nodes/MapBox/MapPushpinBox.tsx')

diff --git a/src/client/views/nodes/MapBox/MapPushpinBox.tsx b/src/client/views/nodes/MapBox/MapPushpinBox.tsx
new file mode 100644
index 000000000..13fb11054
--- /dev/null
+++ b/src/client/views/nodes/MapBox/MapPushpinBox.tsx
@@ -0,0 +1,38 @@
+import { observer } from 'mobx-react';
+// import { SettingsManager } from '../../../util/SettingsManager';
+import { ViewBoxBaseComponent } from '../../DocComponent';
+import { FieldView, FieldViewProps } from '../FieldView';
+import React = require('react');
+import { computed } from 'mobx';
+import { MapBox } from './MapBox';
+
+
+/**
+ * Map Pushpin doc class
+ */
+@observer
+export class MapPushpinBox extends ViewBoxBaseComponent<FieldViewProps>() {
+
+
+    public static LayoutString(fieldKey: string) {
+        return FieldView.LayoutString(MapPushpinBox, fieldKey);
+    }
+    componentDidMount() {
+        this.mapBoxView.addPushpin(this.rootDoc);
+    }
+    componentWillUnmount() {
+        this.mapBoxView.removePushpin(this.rootDoc);
+    }
+
+
+    @computed get mapBoxView() {
+        return this.props.DocumentView?.()?.props.docViewPath().lastElement()?.ComponentView as MapBox;
+    }
+    @computed get mapBox() {
+        return this.props.DocumentView?.().props.docViewPath().lastElement()?.rootDoc;
+    }
+
+    render() {
+        return (<div></div>);
+    }
+}
-- 
cgit v1.2.3-70-g09d2

