summaryrefslogtreecommitdiff
path: root/gui/src/components/post/Footer.tsx
diff options
context:
space:
mode:
authorpolwex <polwex@sortug.com>2025-11-12 10:32:46 +0700
committerpolwex <polwex@sortug.com>2025-11-12 10:32:46 +0700
commitab786760a16c07031fa9b7e8987ebe755a57912c (patch)
treefae744eb25a196d8fe94a95be55c246ac3679545 /gui/src/components/post/Footer.tsx
parent284ce9ce7d9f81e54e91f917329d48926487fbf4 (diff)
further fixes to engagement flow
Diffstat (limited to 'gui/src/components/post/Footer.tsx')
-rw-r--r--gui/src/components/post/Footer.tsx32
1 files changed, 6 insertions, 26 deletions
diff --git a/gui/src/components/post/Footer.tsx b/gui/src/components/post/Footer.tsx
index a87c1f8..87f45f3 100644
--- a/gui/src/components/post/Footer.tsx
+++ b/gui/src/components/post/Footer.tsx
@@ -51,7 +51,7 @@ function Footer({ poast, refetch }: PostProps) {
async function cancelRP(e: React.MouseEvent) {
e.stopPropagation();
e.preventDefault();
- const r = await api!.deletePost(our);
+ const r = await api!.deletePost(poast.host, poast.id);
if (r) toast.success("Repost deleted");
// refetch();
if (location.includes(poast.id)) navigate("/");
@@ -60,31 +60,11 @@ function Footer({ poast, refetch }: PostProps) {
// TODO update backend because contents are only markdown now
e.stopPropagation();
e.preventDefault();
- // const c = [
- // {
- // ref: {
- // type: "trill",
- // ship: poast.host,
- // path: `/${poast.id}`,
- // },
- // },
- // ];
- // const post: SentPoast = {
- // host: our,
- // author: our,
- // thread: null,
- // parent: null,
- // contents: input,
- // read: openLock,
- // write: openLock,
- // tags: [], // TODO
- // };
- // const r = await api!.addPost(post, false);
- // setReposting(true);
- // if (r) {
- // setReposting(false);
- // toast.success("Your post was published");
- // }
+ const pid = { ship: poast.host, id: poast.id };
+ const r = await api!.addRP(pid);
+ if (r) {
+ toast.success("Your repost was published");
+ }
}
function doReact(e: React.MouseEvent) {
e.stopPropagation();