Skip to content
This repository has been archived by the owner on Jan 3, 2025. It is now read-only.

Move RegistrationTable back into wca-registrations #282

Merged
merged 7 commits into from
Oct 27, 2023

Conversation

FinnIckler
Copy link
Member

Not sure why I thought it was a good idea to move a component that is named registration-table into wca-components 🙃 .
For some reason data is only correctly displayed on the second fetch now though, can you see something that could cause this @kr-matthews or @coder13 ?

I suspect

const [state, dispatch] = useReducer(sortReducer, {
   column: '',
   data: registrations,
   direction: undefined,
 })

@FinnIckler
Copy link
Member Author

@thewca-bot deploy staging

Copy link
Contributor

@kr-matthews kr-matthews left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you mean by the second fetch?

@FinnIckler
Copy link
Member Author

With second fetch I mean something like this.
Go to Competitors -> Competitors are empty. Go to another tab, then to competitors again -> competitors are there. I guess second render makes more sense

@FinnIckler
Copy link
Member Author

@thewca-bot deploy staging

@kr-matthews
Copy link
Contributor

For some reason data is only correctly displayed on the second fetch now though, can you see something that could cause this @kr-matthews or @coder13 ?

I suspect

const [state, dispatch] = useReducer(sortReducer, {
   column: '',
   data: registrations,
   direction: undefined,
 })

I've identified the issue (yes, it's the reducer as you suspected) and proposed a couple of solutions on slack.

@FinnIckler
Copy link
Member Author

moved data out of the reducer

@FinnIckler FinnIckler merged commit c8b9d70 into main Oct 27, 2023
1 check passed
@FinnIckler FinnIckler deleted the feature/registration-table branch October 27, 2023 18:12
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants