mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2025-01-10 18:27:25 +03:00
Fixed fallback interval not working on visits pages
This commit is contained in:
parent
5d712d7d78
commit
6f5c5b122f
1 changed files with 6 additions and 0 deletions
|
@ -122,6 +122,12 @@ export const VisitsStats: FC<VisitsStatsProps> = ({
|
|||
getVisits({ dateRange: resolvedDateRange, filter: visitsFilter }, isFirstLoad.current);
|
||||
isFirstLoad.current = false;
|
||||
}, [dateRange, visitsFilter]);
|
||||
useEffect(() => {
|
||||
// As soon as the fallback is loaded, if the initial interval used the settings one, we do fall back
|
||||
if (fallbackInterval && initialInterval.current === (settings.visits?.defaultInterval ?? 'last30Days')) {
|
||||
initialInterval.current = fallbackInterval;
|
||||
}
|
||||
}, [fallbackInterval]);
|
||||
|
||||
const renderVisitsContent = () => {
|
||||
if (loadingLarge) {
|
||||
|
|
Loading…
Reference in a new issue