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

Refresh bug with profiles on opensats.org/about #170

Closed
Arvin21M opened this issue Nov 6, 2023 · 4 comments
Closed

Refresh bug with profiles on opensats.org/about #170

Arvin21M opened this issue Nov 6, 2023 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@Arvin21M
Copy link
Contributor

Arvin21M commented Nov 6, 2023

@dergigi

OpenSats website>About page:

There is a bug when the page is refreshed; when a members profile is clicked after refresh, often another members profile opens. Seems to only be happening when refreshing. Recorded screen of the issue to help you duplicate the bug on your end. Click here to watch the recording. Let me know how I can help.

Thank you.

@Arvin21M Arvin21M added the bug Something isn't working label Nov 6, 2023
@Arvin21M Arvin21M changed the title Refresh bug on opensats.org/about: Refreshing page>clicking profile>swaps profile identity. Refresh bug with profiles on opensats.org/about Nov 6, 2023
@dergigi
Copy link
Member

dergigi commented Nov 6, 2023

Damn. I was able to reproduce this in production.

@moteanup24 maybe you can have a look at this and try to track down the bug?

@bitcoinprecept
Copy link

Not sure if it's related, but I noticed the order of icons changes whenever you refresh the page. If this behavior is not intentional, it could be related.

@moteanup24
Copy link
Contributor

@dergigi

Update: I'm pretty sure the bug is occurring because the randomization in getStaticProps() in pages/about/index.tsx is not being propagated down through to the MDXComponents. You'll notice that the randomization is repeated in components/BoardMembers as well as ./OpsTeam and ./Volunteers. So I think multiple Math.random() calls is causing the issue.

I think what we want is to create a randomized 'master' author array as a static prop in index.tsx, and pass it through MDXLayoutRenderer to the MDXComponents so that when the {openSats} content renders, it does so with the static randomized author array. Unfortunately I haven't been able to figure out how to pass the static props through to MDX components...

Unless I'm missing a quick way to do this (I am still getting familiar with MDX) I'd be inclined to just do away with the randomization on the about page. I also tried rewriting the about/index page using more vanilla jsx which seems to allow for more straightforward passing of props, which is do-able but then would require more manual formatting.

This is probably entirely too long for your taste but I wanted to provide an update and give you a chance to weigh in.

@moteanup24
Copy link
Contributor

#187

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants