mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-03-14 19:43:49 +00:00
Created page for tag visit stats
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import { handleActions } from 'redux-actions';
|
||||
import { assoc, assocPath, reject } from 'ramda';
|
||||
import PropTypes from 'prop-types';
|
||||
import { CREATE_SHORT_URL_VISIT } from '../../visits/reducers/shortUrlVisits';
|
||||
import { shortUrlMatches } from '../helpers';
|
||||
import { CREATE_VISIT } from '../../visits/reducers/visitCreation';
|
||||
import { SHORT_URL_TAGS_EDITED } from './shortUrlTags';
|
||||
import { SHORT_URL_DELETED } from './shortUrlDeletion';
|
||||
import { SHORT_URL_META_EDITED, shortUrlMetaType } from './shortUrlMeta';
|
||||
@@ -50,7 +50,7 @@ export default handleActions({
|
||||
[SHORT_URL_TAGS_EDITED]: setPropFromActionOnMatchingShortUrl('tags'),
|
||||
[SHORT_URL_META_EDITED]: setPropFromActionOnMatchingShortUrl('meta'),
|
||||
[SHORT_URL_EDITED]: setPropFromActionOnMatchingShortUrl('longUrl'),
|
||||
[CREATE_SHORT_URL_VISIT]: (state, { shortUrl: { shortCode, domain, visitsCount } }) => assocPath(
|
||||
[CREATE_VISIT]: (state, { shortUrl: { shortCode, domain, visitsCount } }) => assocPath(
|
||||
[ 'shortUrls', 'data' ],
|
||||
state.shortUrls && state.shortUrls.data && state.shortUrls.data.map(
|
||||
(shortUrl) => shortUrlMatches(shortUrl, shortCode, domain)
|
||||
|
||||
Reference in New Issue
Block a user