>(raw) ?? {};
+ return (
+ <>
+
+ Previews are approximate/under development — content and styling
+ may differ from production, and not all functionality will be
+ available.
+
+
+ >
+ );
+};
+
+export default IdeaPostPreview;
diff --git a/src/templates/idea-post.tsx b/src/templates/idea-post.tsx
index 1f40dc04..442a4b9d 100644
--- a/src/templates/idea-post.tsx
+++ b/src/templates/idea-post.tsx
@@ -41,18 +41,20 @@ const {
tagRowLabel,
} = require("../style/idea-post.module.css");
-export const IdeaPostTemplate: React.FC<
- IdeaPostNode & {
- onExpandDescription?: (
- content: string,
- label: string,
- sectionKey: string,
- ) => void;
- }
-> = ({
+export type IdeaPostTemplateProps = IdeaPostNode & {
+ isPreview?: boolean;
+ onExpandDescription?: (
+ content: string,
+ label: string,
+ sectionKey: string,
+ ) => void;
+};
+
+export const IdeaPostTemplate: React.FC = ({
authors,
date,
introduction,
+ isPreview,
nextSteps,
onExpandDescription,
preliminaryFindings,
@@ -121,27 +123,34 @@ export const IdeaPostTemplate: React.FC<
-
- setContactModalOpen(false)}
- />
+ {!isPreview && (
+ setContactModalOpen(false)}
+ />
+ )}
{/* Tag row */}
{tags && tags.length > 0 && (
Topics
- {tags.map((t) => (
-
- ))}
+ {tags.map((t) =>
+ isPreview ? (
+
+ {t}
+
+ ) : (
+
+ ),
+ )}
)}
@@ -198,16 +207,25 @@ export const IdeaPostTemplate: React.FC<
)}
- {resources && (
-
- )}
+ {resources &&
+ (isPreview ? (
+
+ {(resources as unknown as string[]).map(
+ (slug) => (
+ - {slug}
+ ),
+ )}
+
+ ) : (
+
+ ))}
- {hasRelatedIdeas && (
+ {hasRelatedIdeas && !isPreview && (