From 4557de424cdd9a88bf38925c1a4319da237e9f94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jenny=20M=C3=BCller?= <113467867+jennymul@users.noreply.github.com> Date: Wed, 6 Nov 2024 19:47:46 +0100 Subject: [PATCH] Make approving of qoutes intuitive --- app/routes/quotes/components/Quote.tsx | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/app/routes/quotes/components/Quote.tsx b/app/routes/quotes/components/Quote.tsx index efec557130..c95c821168 100644 --- a/app/routes/quotes/components/Quote.tsx +++ b/app/routes/quotes/components/Quote.tsx @@ -30,6 +30,7 @@ const Quote = ({ const fetchingEmojis = useAppSelector((state) => state.emojis.fetching); const [deleting, setDeleting] = useState(false); + const [pippi, setPippi] = useState(true); const dispatch = useAppDispatch(); let mappedEmojis: (Emoji & { hasReacted: boolean; reactionId: EntityId })[] = @@ -93,17 +94,15 @@ const Quote = ({ iconName="ellipsis-horizontal" > - - - + {!quote.approved && pippi ? ( + + + + ) : ( +
+ )} {!deleting ? ( @@ -113,8 +112,8 @@ const Quote = ({ e.preventDefault(); e.stopPropagation(); } - setDeleting(!deleting); + setPippi(false); }} > Slett @@ -123,7 +122,7 @@ const Quote = ({ ) : ( )}