From 8751ba26ebf7b7761b9e237f2bf3453623dd1018 Mon Sep 17 00:00:00 2001
From: polwex <polwex@sortug.com>
Date: Mon, 6 Oct 2025 10:13:39 +0700
Subject: added frontend WS connection for demonstration purposes

---
 gui/src/components/post/External.tsx | 40 ++++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)
 create mode 100644 gui/src/components/post/External.tsx

(limited to 'gui/src/components/post/External.tsx')

diff --git a/gui/src/components/post/External.tsx b/gui/src/components/post/External.tsx
new file mode 100644
index 0000000..d52aec7
--- /dev/null
+++ b/gui/src/components/post/External.tsx
@@ -0,0 +1,40 @@
+import type { ExternalContent } from "@/types/trill";
+import Card from "./Card";
+
+interface JSONProps {
+  content: ExternalContent[];
+}
+
+function JSONContent({ content }: JSONProps) {
+  return (
+    <>
+      {content.map((c, i) => {
+        if (!JSON.parse(c.json.content)) return <p key={i}>Error</p>;
+        else
+          return (
+            <p
+              key={JSON.stringify(c.json)}
+              className="external-content-warning"
+            >
+              External content from "{c.json.origin}", use
+              <a href="https://urbit.org/applications/~sortug/ufa">UFA</a>
+              to display.
+            </p>
+          );
+      })}
+    </>
+  );
+}
+export default JSONContent;
+
+export function YoutubeSnippet({ href, id }: { href: string; id: string }) {
+  const thumbnail = `https://i.ytimg.com/vi/${id}/hqdefault.jpg`;
+  // todo styiling
+  return (
+    <Card logo="youtube" cn="youtube-thumbnail">
+      <a href={href}>
+        <img src={thumbnail} alt="" />
+      </a>
+    </Card>
+  );
+}
-- 
cgit v1.2.3

