mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-03-16 20:43:48 +00:00
Simplified instructions removing redundant vars
This commit is contained in:
@@ -36,10 +36,8 @@ const ShortUrlVisits = (
|
|||||||
loadVisits = (loadDetail = false) => {
|
loadVisits = (loadDetail = false) => {
|
||||||
const { match: { params }, location: { search }, getShortUrlVisits, getShortUrlDetail } = this.props;
|
const { match: { params }, location: { search }, getShortUrlVisits, getShortUrlDetail } = this.props;
|
||||||
const { shortCode } = params;
|
const { shortCode } = params;
|
||||||
const dates = mapObjIndexed(formatDate(), this.state);
|
const { startDate, endDate } = mapObjIndexed(formatDate(), this.state);
|
||||||
const { startDate, endDate } = dates;
|
const { domain } = qs.parse(search, { ignoreQueryPrefix: true });
|
||||||
const queryParams = qs.parse(search, { ignoreQueryPrefix: true });
|
|
||||||
const { domain } = queryParams;
|
|
||||||
|
|
||||||
// While the "page" is loaded, use the timestamp + filtering dates as memoization IDs for stats calculations
|
// While the "page" is loaded, use the timestamp + filtering dates as memoization IDs for stats calculations
|
||||||
this.memoizationId = `${this.timeWhenMounted}_${shortCode}_${startDate}_${endDate}`;
|
this.memoizationId = `${this.timeWhenMounted}_${shortCode}_${startDate}_${endDate}`;
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { shallow } from 'enzyme';
|
import { shallow } from 'enzyme';
|
||||||
import { Modal } from 'reactstrap';
|
import { Modal } from 'reactstrap';
|
||||||
import createEditTagsModal from '../../../src/short-urls/helpers/EditTagsModal';
|
|
||||||
import each from 'jest-each';
|
import each from 'jest-each';
|
||||||
|
import createEditTagsModal from '../../../src/short-urls/helpers/EditTagsModal';
|
||||||
|
|
||||||
describe('<EditTagsModal />', () => {
|
describe('<EditTagsModal />', () => {
|
||||||
let wrapper;
|
let wrapper;
|
||||||
|
|||||||
Reference in New Issue
Block a user