mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-03-10 09:33:51 +00:00
Fixed mercure integration
This commit is contained in:
@@ -49,10 +49,13 @@ const increaseVisitsForTags = (tags: TagIncrease[], stats: TagsStatsMap) => tags
|
||||
|
||||
const tagStats = theStats[tag];
|
||||
|
||||
tagStats.visitsCount += increase;
|
||||
theStats[tag] = tagStats; // eslint-disable-line no-param-reassign
|
||||
|
||||
return theStats;
|
||||
return {
|
||||
...theStats,
|
||||
[tag]: {
|
||||
...tagStats,
|
||||
visitsCount: tagStats.visitsCount + increase,
|
||||
},
|
||||
};
|
||||
}, { ...stats });
|
||||
const calculateVisitsPerTag = (createdVisits: CreateVisit[]): TagIncrease[] => Object.entries(
|
||||
createdVisits.reduce<Stats>((acc, { shortUrl }) => {
|
||||
|
||||
Reference in New Issue
Block a user