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

URL Search Params for Players and History page #942

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

AleksanderEvensen
Copy link
Contributor

So I checked out your dev notes and found the wouter and URL search params to-do entry, and I thought maybe I could do this. I'm sorry if I was supposed to contact you about this before starting, but giving the feature was pretty simple to implement I figured that I could just make a PR and see if you liked it or not.

The URL parameters will update when the state changes in the component. If this is not the expected behavior and you wanted it to be a copy URL button instead, I could change the code around.

I also removed the export on the throttleFunc in both files. Vite HMR won't complain if the export is removed. HMR is also fully functional without the export.

//FIXME: this doesn't require exporting, but HMR doesn't work without it
// eslint-disable-next-line @typescript-eslint/no-explicit-any, react-refresh/only-export-components
export const throttleFunc = throttle(1250, (func: any) => {
    func();
}, { noLeading: true });

Video showcasing the feature.

brave_HHb5waBgkH.mp4

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.

None yet

2 participants