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

[Feature request] List of future events/gachas, counting backwards from current, for EN, TW, KR servers #505

Open
Icequeen3333 opened this issue Jul 4, 2024 · 6 comments
Labels
enhancement New feature or request

Comments

@Icequeen3333
Copy link

Motivation.
I like knowing how many events I have until a specific event/rerun, and I absolutely hate having to scroll through a full year of events/gachas to get to it. Also, the spoiler tag is a bit... lackluster? It feels like it's less of spoilers and more 'if you have seen the colorful corner, this isn't a spoiler.'

Suggested Implementation
So I was actually going to try and work on this with my own page, and trying to find the database used here, but I cannot parse through this for the life of me, other than you guys using useState a lot to get the gachas/events.

I'd assume that taking the event/gacha list for jp, sorting it backwards, and using the same cutoff feature for the EN event time would work?

I'll work on this whenever I can for a pull request :]

Also I'll probably fix the readme with this pr because it is the basic create react app readme.

@Icequeen3333 Icequeen3333 added the enhancement New feature or request label Jul 4, 2024
@Icequeen3333
Copy link
Author

Okay so I've gotten the basic system done with this fork

My only issue with the implementation is that it will change the region to JP, and won't change it back automatically. It's a small thing, but I'd like to change it so it keeps region as the original region. I've tried this a few different ways without seriously modifying any code besides my little bubble of futureEvents/Gachas, and the page reloading 10 times (yes I counted) seems to be the hurdle I can't cross.

If anyone has any advice on how to store that (because region is used in the fetching of gachas/events, it needs to be changed to jp in order to get the future ones), would be great.

@Icequeen3333
Copy link
Author

@dnaroma I'd like to implement this, if you have any solutions for storing the original region that would be great! Would like to keep it only within my little two pages, but I can't think of any other way to do so.

@dnaroma
Copy link
Contributor

dnaroma commented Jul 25, 2024

Hello, I'd like to analyze your code and come with a solution to store the original region.

@Icequeen3333
Copy link
Author

That would be great! The two pages are here, I copied the logic for event and gacha and changed them slightly. Only works with spoilers enabled

@dnaroma
Copy link
Contributor

dnaroma commented Jul 29, 2024

Hi I analysed your code and came with an simple idea. I guess you set the region to JP in order to fetch data from JP server, which is actually done in useCachedData. My suggestion is to extend this function, add a second optional parameter region, if it does not exist, then it will fallback to region in store.

PS: it would be easier to tell you how to modify if you open a Pull Request.

@Icequeen3333
Copy link
Author

Alright, thank you! I'll do a pull request once I add the method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants