From 4a45f638540a453d2fa0d5713780d5a09191433a 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 18:56:48 +0100 Subject: [PATCH 1/2] Remove duplicate settings button --- .../UserProfile/UserProfile.module.css | 6 ++++- .../users/components/UserProfile/index.tsx | 23 +++++++++---------- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/app/routes/users/components/UserProfile/UserProfile.module.css b/app/routes/users/components/UserProfile/UserProfile.module.css index bc0d449e19..e3bbc8d6ca 100644 --- a/app/routes/users/components/UserProfile/UserProfile.module.css +++ b/app/routes/users/components/UserProfile/UserProfile.module.css @@ -79,9 +79,13 @@ .settingsIcon { transition: transform var(--easing-medium); +} +.settingsButton { &:hover { - transform: rotate(90deg); + .settingsIcon { + transform: rotate(90deg); + } } } diff --git a/app/routes/users/components/UserProfile/index.tsx b/app/routes/users/components/UserProfile/index.tsx index c12adbad66..4ef9fa8aad 100644 --- a/app/routes/users/components/UserProfile/index.tsx +++ b/app/routes/users/components/UserProfile/index.tsx @@ -157,12 +157,17 @@ const UserProfile = () => { title={user.fullName} actionButtons={ showSettings && ( - } - size={22} - className={styles.settingsIcon} - to={`/users/${user.username}/settings/profile`} - /> + + } + size={22} + className={styles.settingsIcon} + />{' '} + Innstillinger + ) } > @@ -195,12 +200,6 @@ const UserProfile = () => { )} - {showSettings && ( - - } size={19} /> - Innstillinger - - )} Date: Wed, 6 Nov 2024 19:47:46 +0100 Subject: [PATCH 2/2] Make approving of qoutes intuitive --- app/routes/quotes/components/Quote.tsx | 27 +++++++++++++------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/app/routes/quotes/components/Quote.tsx b/app/routes/quotes/components/Quote.tsx index efec557130..4cb7ea8441 100644 --- a/app/routes/quotes/components/Quote.tsx +++ b/app/routes/quotes/components/Quote.tsx @@ -1,6 +1,6 @@ import { useState } from 'react'; import { Link } from 'react-router-dom'; -import { approve, deleteQuote, unapprove } from 'app/actions/QuoteActions'; +import { approve, deleteQuote } from 'app/actions/QuoteActions'; import Dropdown from 'app/components/Dropdown'; import Reactions from 'app/components/Reactions'; import Reaction from 'app/components/Reactions/Reaction'; @@ -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 = ({ ) : ( )}