@@ -4,11 +4,11 @@ import { isBetween } from '../../utils/dates/helpers/date';
44import { isOrphanVisit } from '../helpers' ;
55import { createVisitsAsyncThunk , createVisitsReducer , lastVisitLoaderForLoader } from './common' ;
66import type { deleteOrphanVisits } from './orphanVisitsDeletion' ;
7- import type { LoadVisits , VisitsInfo } from './types' ;
7+ import type { LoadWithDomainVisits , VisitsInfo } from './types' ;
88
99const REDUCER_PREFIX = 'shlink/orphanVisits' ;
1010
11- export interface LoadOrphanVisits extends LoadVisits {
11+ export interface LoadOrphanVisits extends LoadWithDomainVisits {
1212 orphanVisitsType ?: ShlinkOrphanVisitType ;
1313}
1414
@@ -30,13 +30,14 @@ const filterOrphanVisitsByType = ({ data, ...rest }: ShlinkVisitsList, type?: Sh
3030
3131export const getOrphanVisits = ( apiClientFactory : ( ) => ShlinkApiClient ) => createVisitsAsyncThunk ( {
3232 typePrefix : `${ REDUCER_PREFIX } /getOrphanVisits` ,
33- createLoaders : ( { orphanVisitsType, options } : LoadOrphanVisits ) => {
33+ createLoaders : ( { orphanVisitsType, domain , options } : LoadOrphanVisits ) => {
3434 const apiClient = apiClientFactory ( ) ;
3535 const { doIntervalFallback = false } = options ;
3636
3737 const visitsLoader = async ( query : ShlinkVisitsParams ) => apiClient . getOrphanVisits ( {
3838 ...query ,
39- type : orphanVisitsType , // Send type to the server, in case it supports filtering by type
39+ type : orphanVisitsType ,
40+ domain,
4041 } ) . then (
4142 // We still try to filter locally, for Shlink older than 4.0.0
4243 ( resp ) => filterOrphanVisitsByType ( resp , orphanVisitsType ) ,
0 commit comments