summaryrefslogtreecommitdiff
path: root/front/src/components/feed/Media.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'front/src/components/feed/Media.tsx')
-rw-r--r--front/src/components/feed/Media.tsx35
1 files changed, 0 insertions, 35 deletions
diff --git a/front/src/components/feed/Media.tsx b/front/src/components/feed/Media.tsx
deleted file mode 100644
index 04ea156..0000000
--- a/front/src/components/feed/Media.tsx
+++ /dev/null
@@ -1,35 +0,0 @@
-import type { Media } from "@/types/trill";
-interface Props {
- media: Media[];
-}
-function M({ media }: Props) {
- return (
- <div className="body-media">
- {media.map((m, i) => {
- return "video" in m.media ? (
- <video key={JSON.stringify(m) + i} src={m.media.video} controls />
- ) : "audio" in m.media ? (
- <audio key={JSON.stringify(m) + i} src={m.media.audio} controls />
- ) : "images" in m.media ? (
- <Images key={JSON.stringify(m) + i} urls={m.media.images} />
- ) : null;
- })}
- </div>
- );
-}
-export default M;
-
-function Images({ urls }: { urls: string[] }) {
- return (
- <>
- {urls.map((u, i) => (
- <img
- key={u + i}
- className={`body-img body-img-1-of-${urls.length}`}
- src={u}
- alt=""
- />
- ))}
- </>
- );
-}