Fixed tests and typos

This commit is contained in:
Alejandro Celaya
2020-01-14 20:12:30 +01:00
parent b60908a5e9
commit 5eb4a3adec
5 changed files with 29 additions and 11 deletions

View File

@@ -38,7 +38,7 @@ const SearchBar = (colorGenerator) => {
<DateRangeRow
startDate={dateOrUndefined(shortUrlsListParams.startDate)}
endDate={dateOrUndefined(shortUrlsListParams.endDate)}
onStartDateChane={setDate('startDate')}
onStartDateChange={setDate('startDate')}
onEndDateChange={setDate('endDate')}
/>
</div>

View File

@@ -7,11 +7,11 @@ const dateType = PropTypes.oneOfType([ PropTypes.string, PropTypes.object ]);
const propTypes = {
startDate: dateType,
endDate: dateType,
onStartDateChane: PropTypes.func.isRequired,
onStartDateChange: PropTypes.func.isRequired,
onEndDateChange: PropTypes.func.isRequired,
};
const DateRangeRow = ({ startDate, endDate, onStartDateChane, onEndDateChange }) => (
const DateRangeRow = ({ startDate, endDate, onStartDateChange, onEndDateChange }) => (
<div className="row">
<div className="col-xl-3 col-lg-4 col-md-6 offset-xl-6 offset-lg-4">
<DateInput
@@ -19,7 +19,7 @@ const DateRangeRow = ({ startDate, endDate, onStartDateChane, onEndDateChange })
placeholderText="Since"
isClearable
maxDate={endDate}
onChange={onStartDateChane}
onChange={onStartDateChange}
/>
</div>
<div className="col-xl-3 col-lg-4 col-md-6">

View File

@@ -138,7 +138,7 @@ const ShortUrlVisits = (
<DateRangeRow
startDate={this.state.startDate}
endDate={this.state.endDate}
onStartDateChane={setDate('startDate')}
onStartDateChange={setDate('startDate')}
onEndDateChange={setDate('endDate')}
/>
</section>