fribbels / hsr-optimizer

A Honkai Star Rail optimizer, relic scorer, damage calculator, and various other tools for building and gearing characters
https://fribbels.github.io/hsr-optimizer/
MIT License
209 stars 42 forks source link

[Feature] Throttle relic scorer submit button #450

Open fribbels opened 2 weeks ago

fribbels commented 2 weeks ago

Motivation

The button fires off an api request each time, we should rate limit it on the UI side

Goal

Start a timer after each button submission and prevent the user from being able to submit the request until the timer is up. Say, 10 seconds, then if pressed again before 15s is up, there should be a popup that says "Please wait X seconds before trying again"