From b1d68ac307ed87d63e83820cbdf843fff0fd9f7f Mon Sep 17 00:00:00 2001
From: polwex <polwex@sortug.com>
Date: Thu, 11 Sep 2025 01:48:14 +0700
Subject: init

---
 front/src/components/feed/External.tsx | 41 ++++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)
 create mode 100644 front/src/components/feed/External.tsx

(limited to 'front/src/components/feed/External.tsx')

diff --git a/front/src/components/feed/External.tsx b/front/src/components/feed/External.tsx
new file mode 100644
index 0000000..0ea1500
--- /dev/null
+++ b/front/src/components/feed/External.tsx
@@ -0,0 +1,41 @@
+import type { ExternalContent } from "@/types/trill";
+import youtube from "@/assets/icons/youtube.svg";
+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

