Skip to content
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

Don't allow double clicking on logout button #1657

Conversation

Adamik10
Copy link
Contributor

@Adamik10 Adamik10 commented Jan 23, 2025

Link to issue

https://reload.atlassian.net/browse/DDFBRA-331

Description

This PR changes the way we use links ( ) when we need to do more than just simply redirect. The change was necessary when fixing a bug where users could click on the logout button multiple times, causing problems with mismatched tokens.
Due to us sometimes needing to do two separate things before redirecting, we in the past had to hack our way to the tag not firing the redirect, cuz we needed to first track the click + delete some persisted data.

I also fixed a small console error where mapped list items didn't have the "key" prop.

Screenshot of the result

Additional comments or questions

This is a part of the movement to not use links ( <a/> ) when we need
to do more than just simply redirect. Due to us sometimes (this case
included) needing to do two separate things before redirecting, we in
the past had to hack our way to the <a/> tag not firing the redirect,
cuz we needed to first track the click + delete some persisted data.
This is a part of the movement to not use links ( <a/> ) when we need
to do more than just simply redirect. Due to us sometimes (this case
included) needing to do two separate things before redirecting, we in
the past had to hack our way to the <a/> tag not firing the redirect,
cuz we needed to first track the click + delete some persisted data.
Because we no longer use links when we need to track clicks (see prev.
commits to understand why if that's what you're after).
@Adamik10 Adamik10 assigned spaceo, Dresse and ThomasGross and unassigned spaceo and Dresse Jan 27, 2025
@Adamik10 Adamik10 requested a review from ThomasGross January 27, 2025 12:41
@Adamik10 Adamik10 merged commit a2f81d6 into develop Feb 4, 2025
20 checks passed
@Adamik10 Adamik10 deleted the DDFBRA-331-log-ud-giver-meddelelse-beklager-du-har-ikke-adgang-til-denne-side-v2 branch February 4, 2025 08:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants