From 33376297c14015d293049d16f1357ff6313b60d9 Mon Sep 17 00:00:00 2001 From: "Samuel T." Date: Wed, 27 Nov 2024 11:31:36 -0500 Subject: [PATCH] clearer widget deletion + post edit button (#308) --- .../src/components/social/PostCard.tsx | 13 +++++++++---- .../src/components/social/WidgetDialog.tsx | 2 +- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/canopeum_frontend/src/components/social/PostCard.tsx b/canopeum_frontend/src/components/social/PostCard.tsx index 87ee3056..67535285 100644 --- a/canopeum_frontend/src/components/social/PostCard.tsx +++ b/canopeum_frontend/src/components/social/PostCard.tsx @@ -1,4 +1,5 @@ import { useContext, useRef, useState } from 'react' +import { useTranslation } from 'react-i18next' import { Dropdown, Popover } from 'rsuite' import DropdownMenu from 'rsuite/esm/Dropdown/DropdownMenu' import type { OverlayTriggerHandle } from 'rsuite/esm/internals/Picker' @@ -23,6 +24,7 @@ type Props = { } const PostCard = ({ post, deletePost }: Props) => { + const { t } = useTranslation() const { formatDate } = useContext(LanguageContext) const { toggleLike } = usePostsStore() const { getApiClient } = useApiClient() @@ -72,10 +74,13 @@ const PostCard = ({ post, deletePost }: Props) => { style={{ width: 'fit-content' }} > - setConfirmPostDeleteOpen(true)}> -
- delete -
+ + edit_square{' '} + {t('generic.edit')} (Not yet implemented) + + setConfirmPostDeleteOpen(true)}> + delete + {' '}{t('generic.delete')}
diff --git a/canopeum_frontend/src/components/social/WidgetDialog.tsx b/canopeum_frontend/src/components/social/WidgetDialog.tsx index 0cc741fb..30acc04e 100644 --- a/canopeum_frontend/src/components/social/WidgetDialog.tsx +++ b/canopeum_frontend/src/components/social/WidgetDialog.tsx @@ -50,7 +50,7 @@ const WidgetDialog = ({ handleClose, open }: Props) => { onClick={() => handleClose('delete', innerWidget)} type='button' > - cancel + delete )}