From f0df4c7297a05bd592d8717b8997284c80fd0500 Mon Sep 17 00:00:00 2001 From: polwex Date: Wed, 17 Sep 2025 15:56:00 +0700 Subject: argh --- front/src/components/feed/StatsModal.tsx | 106 ------------------------------- 1 file changed, 106 deletions(-) delete mode 100644 front/src/components/feed/StatsModal.tsx (limited to 'front/src/components/feed/StatsModal.tsx') diff --git a/front/src/components/feed/StatsModal.tsx b/front/src/components/feed/StatsModal.tsx deleted file mode 100644 index 4720b2a..0000000 --- a/front/src/components/feed/StatsModal.tsx +++ /dev/null @@ -1,106 +0,0 @@ -import type { Poast } from "@/types/trill"; -import Modal from "../modals/Modal"; -import { useState } from "react"; -import Post from "./Post"; -import RP from "./RP"; -import Avatar from "../Avatar"; -import { stringToReact } from "./Reactions"; - -function StatsModal({ poast, close }: { close: any; poast: Poast }) { - const [tab, setTab] = useState("replies"); - const replies = poast.children || []; - const quotes = poast.engagement.quoted; - const reposts = poast.engagement.shared; - const reacts = poast.engagement.reacts; - function set(e: React.MouseEvent, s: string) { - e.stopPropagation(); - setTab(s); - } - // TODO revise the global thingy here - return ( - -
- {}} /> -
-
set(e, "replies")} - > -

Replies

-
-
set(e, "quotes")} - > -

Quotes

-
-
set(e, "reposts")} - > -

Reposts

-
-
set(e, "reacts")} - > -

Reacts

-
-
-
- {tab === "replies" ? ( -
- {replies.map((p) => ( -
- -
- ))} -
- ) : tab === "quotes" ? ( -
- {quotes.map((p) => ( -
- -
- ))} -
- ) : tab === "reposts" ? ( -
- {reposts.map((p) => ( -
- -
- ))} -
- ) : tab === "reacts" ? ( -
- {Object.keys(reacts).map((p) => ( -
- - {stringToReact(reacts[p])} -
- ))} -
- ) : null} -
-
-
- ); -} -export default StatsModal; -- cgit v1.2.3