{ t('startTour') }
diff --git a/src/apps/posts/PlaceInsert.tsx b/src/apps/posts/PlaceInsert.tsx
index a2ef2aee..8fc36b62 100644
--- a/src/apps/posts/PlaceInsert.tsx
+++ b/src/apps/posts/PlaceInsert.tsx
@@ -5,6 +5,9 @@ import { parseFeature } from '@utils/map';
import React, { useMemo } from 'react';
const PlaceInsert = (props: any) => {
+ if (!props?.place || !props?.place?.uuid) {
+ return null;
+ }
const { selected, setSelected } = useSelectionState();
/**
diff --git a/src/apps/posts/PostContent.tsx b/src/apps/posts/PostContent.tsx
index 1776486f..c134e77b 100644
--- a/src/apps/posts/PostContent.tsx
+++ b/src/apps/posts/PostContent.tsx
@@ -11,10 +11,13 @@ import Map from '@visualizations/Map';
import Table from '@visualizations/Table';
import Timeline from '@visualizations/Timeline';
import { TinaMarkdown, TinaMarkdownContent } from 'tinacms/dist/rich-text';
+import { tinaField, useTina } from "tinacms/dist/react";
+import { useMemo } from 'react';
interface PostContentProps {
- content: TinaMarkdownContent;
- title: string;
+ post: any;
+ content?: TinaMarkdownContent;
+ title?: string;
author?: string;
date?: string | number | Date;
}
@@ -22,6 +25,14 @@ interface PostContentProps {
const PostContent = (props: PostContentProps) => {
const { t } = useTranslations();
+ const { data } = useTina({
+ query: props.post.query,
+ variables: props.post.variables,
+ data: props.post.data
+ });
+
+ const post = useMemo(() => data?.post, [data]);
+
return (
- { props.title }
+ { post?.title }
- { (props.author || props.date) &&