mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2025-01-09 09:47:28 +03:00
Fixed all visits interval not working after loading the default configured interval unless switching to another one first
This commit is contained in:
parent
6f5c5b122f
commit
ae625e4c8a
1 changed files with 3 additions and 3 deletions
|
@ -37,7 +37,7 @@ export const useVisitsQuery = (): [VisitsFiltering, UpdateFiltering] => {
|
|||
({ startDate, endDate, orphanVisitsType, excludeBots, domain }: VisitsQuery): VisitsFilteringAndDomain => ({
|
||||
domain,
|
||||
filtering: {
|
||||
dateRange: startDate || endDate ? datesToDateRange(startDate, endDate) : undefined,
|
||||
dateRange: startDate != null || endDate != null ? datesToDateRange(startDate, endDate) : undefined,
|
||||
visitsFilter: { orphanVisitsType, excludeBots: excludeBots === 'true' },
|
||||
},
|
||||
}),
|
||||
|
@ -47,8 +47,8 @@ export const useVisitsQuery = (): [VisitsFiltering, UpdateFiltering] => {
|
|||
const updateFiltering = (extra: DeepPartial<VisitsFiltering>) => {
|
||||
const { dateRange, visitsFilter } = mergeDeepRight(filtering, extra);
|
||||
const query: VisitsQuery = {
|
||||
startDate: (dateRange?.startDate && formatIsoDate(dateRange.startDate)) || undefined,
|
||||
endDate: (dateRange?.endDate && formatIsoDate(dateRange.endDate)) || undefined,
|
||||
startDate: (dateRange?.startDate && formatIsoDate(dateRange.startDate)) || '',
|
||||
endDate: (dateRange?.endDate && formatIsoDate(dateRange.endDate)) || '',
|
||||
excludeBots: visitsFilter.excludeBots ? 'true' : undefined,
|
||||
orphanVisitsType: visitsFilter.orphanVisitsType,
|
||||
domain: theDomain,
|
||||
|
|
Loading…
Reference in a new issue