cubedesk
cubedesk copied to clipboard
User profiles with "WCA Profile Linked" badge do not correctly link to their WCA profile
User profiles with "WCA Profile Linked" badge do not correctly link to the corresponding WCA profile, but rather to the WCA profile of the user signed in. To reproduce:
- Ensure that you have linked your WCA profile to your CubeDesk profile
- Visit another profile with a "WCA Profile Linked" badge (e.g. https://www.cubedesk.io/user/WilliamHerring)
- Click on the badge
Instead of being taken to that user's WCA profile, you will be taken to your own WCA profile. It seems that the issue is in https://github.com/kash/cubedesk/blob/main/client/components/profile/wca/WCA.js / https://github.com/kash/cubedesk/blob/main/client/components/profile/Profile.tsx, where a query is made to get the WCA profile details of only the user logged in, instead of the user which the profile belongs to.
I hope this helps explain the issue, let me know if you need any more details. I might take a look at this issue myself when I have time.