@@ -30,14 +30,7 @@ import { usePluginAvailable } from '../hooks/usePluginAvailable';
3030import { getGoalsGraph , getNeighborsGraph } from '../korrel8r-client' ;
3131import * as api from '../korrel8r/client' ;
3232import * as korrel8r from '../korrel8r/types' ;
33- import {
34- defaultSearch ,
35- Result ,
36- Search ,
37- SearchType ,
38- setResult as setResultAction ,
39- setSearch as setSearchAction ,
40- } from '../redux-actions' ;
33+ import { defaultSearch , Result , Search , SearchType , setResult , setSearch } from '../redux-actions' ;
4134import { State } from '../redux-reducers' ;
4235import * as time from '../time' ;
4336import { AdvancedSearchForm } from './AdvancedSearchForm' ;
@@ -74,7 +67,7 @@ export default function Korrel8rPanel() {
7467 if ( initialized . current ) return ; // Run once on mount
7568 initialized . current = true ;
7669 if ( ! search ?. queryStr && locationQuery ) {
77- dispatch ( setSearchAction ( { ...defaultSearch , queryStr : locationQuery . toString ( ) } ) ) ;
70+ dispatch ( setSearch ( { ...defaultSearch , queryStr : locationQuery . toString ( ) } ) ) ;
7871 }
7972 } , [ search ?. queryStr , locationQuery , dispatch ] ) ;
8073
@@ -90,7 +83,7 @@ export default function Korrel8rPanel() {
9083 } ;
9184 let cancelled = false ;
9285 const onResult = ( newResult : Result ) => {
93- if ( ! cancelled ) dispatch ( setResultAction ( newResult ) ) ;
86+ if ( ! cancelled ) dispatch ( setResult ( newResult ) ) ;
9487 } ;
9588 const fetch =
9689 search . searchType === SearchType . Goal
@@ -115,7 +108,7 @@ export default function Korrel8rPanel() {
115108
116109 // Dispatch a new search.
117110 // The SetSearch reducer clears result, triggering the fetch effect.
118- const doSearch = React . useCallback ( ( s : Search ) => dispatch ( setSearchAction ( s ) ) , [ dispatch ] ) ;
111+ const doSearch = React . useCallback ( ( s : Search ) => dispatch ( setSearch ( s ) ) , [ dispatch ] ) ;
119112
120113 return (
121114 < >
0 commit comments