From 8751ba26ebf7b7761b9e237f2bf3453623dd1018 Mon Sep 17 00:00:00 2001 From: polwex 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

Error

; + else + return ( +

+ External content from "{c.json.origin}", use + UFA + to display. +

+ ); + })} + + ); +} +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 ( + + + + + + ); +} -- cgit v1.2.3