-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make qoute approving intuitive #5163
base: master
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
4557de4
to
a889d7f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The deleting
variable seems to have about the same behaviour as the new thingy you added - is there any reason you did not use that one instead?
@@ -30,6 +30,7 @@ const Quote = ({ | |||
const fetchingEmojis = useAppSelector((state) => state.emojis.fetching); | |||
|
|||
const [deleting, setDeleting] = useState(false); | |||
const [pippi, setPippi] = useState(true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some refactoring needed, but I agree that this can be more intuitive!
{!quote.approved && pippi ? ( | ||
<Dropdown.ListItem> | ||
<button onClick={() => dispatch(approve(quote.id))}> | ||
{'Godkjenn'} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{'Godkjenn'} | |
Godkjenn |
{quote.approved ? 'Fjern godkjenning' : 'Godkjenn'} | ||
</button> | ||
</Dropdown.ListItem> | ||
{!quote.approved && pippi ? ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{!quote.approved && pippi ? ( | |
{!quote.approved ? ( |
?
</button> | ||
</Dropdown.ListItem> | ||
) : ( | ||
<div></div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of using a ternary, just use && so that we don't need empty divs like this in the dom
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not related to this PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again, not relevant to this PR hehe
Description
Remove "Fjern godkjenning" as an option when a qoute is approved. When trying to delete a qoute, remove "Godkjenn" when "Er du sikker?" comes up.
Changes look good on both light and dark theme.
Changes look good with different viewports (mobile, tablet, etc.).
Changes look good with slower Internet connections.
I have thoroughly tested my changes.