Simplified instructions removing redundant vars

This commit is contained in:
Alejandro Celaya 2020-02-08 10:07:34 +01:00
parent c67ce3918b
commit 30e5253acd
2 changed files with 3 additions and 5 deletions

View file

@ -36,10 +36,8 @@ const ShortUrlVisits = (
loadVisits = (loadDetail = false) => {
const { match: { params }, location: { search }, getShortUrlVisits, getShortUrlDetail } = this.props;
const { shortCode } = params;
const dates = mapObjIndexed(formatDate(), this.state);
const { startDate, endDate } = dates;
const queryParams = qs.parse(search, { ignoreQueryPrefix: true });
const { domain } = queryParams;
const { startDate, endDate } = mapObjIndexed(formatDate(), this.state);
const { domain } = qs.parse(search, { ignoreQueryPrefix: true });
// While the "page" is loaded, use the timestamp + filtering dates as memoization IDs for stats calculations
this.memoizationId = `${this.timeWhenMounted}_${shortCode}_${startDate}_${endDate}`;

View file

@ -1,8 +1,8 @@
import React from 'react';
import { shallow } from 'enzyme';
import { Modal } from 'reactstrap';
import createEditTagsModal from '../../../src/short-urls/helpers/EditTagsModal';
import each from 'jest-each';
import createEditTagsModal from '../../../src/short-urls/helpers/EditTagsModal';
describe('<EditTagsModal />', () => {
let wrapper;