@@ -18,12 +18,8 @@ import { PlusCircleIcon, SearchIcon } from '@patternfly/react-icons';
1818import { SVGIconProps } from '@patternfly/react-icons/dist/esm/createIcon' ;
1919import useChrome from '@redhat-cloud-services/frontend-components/useChrome' ;
2020
21- import {
22- BlueprintItem ,
23- GetBlueprintsApiArg ,
24- imageBuilderApi ,
25- useGetBlueprintsQuery ,
26- } from '@/store/api/backend' ;
21+ import { usePlatform } from '@/context/platform' ;
22+ import { BlueprintItem , GetBlueprintsApiArg } from '@/store/api/backend' ;
2723import {
2824 selectBlueprintSearchInput ,
2925 selectLimit ,
@@ -57,6 +53,7 @@ type emptyBlueprintStateProps = {
5753} ;
5854
5955const BlueprintsSidebar = ( ) => {
56+ const { queries } = usePlatform ( ) ;
6057 const { analytics, auth } = useChrome ( ) ;
6158 const { userData } = useGetUser ( auth ) ;
6259 const isOnPremise = useAppSelector ( selectIsOnPremise ) ;
@@ -79,7 +76,7 @@ const BlueprintsSidebar = () => {
7976 data : blueprintsData ,
8077 isLoading,
8178 isFetching,
82- } = useGetBlueprintsQuery ( searchParams ) ;
79+ } = queries . useGetBlueprintsQuery ( searchParams ) ;
8380 const dispatch = useAppDispatch ( ) ;
8481 const blueprints = blueprintsData ?. data ;
8582
@@ -181,6 +178,7 @@ const BlueprintsSidebar = () => {
181178} ;
182179
183180const BlueprintSearch = ( { blueprintsTotal } : blueprintSearchProps ) => {
181+ const { api } = usePlatform ( ) ;
184182 const blueprintSearchInput = useAppSelector ( selectBlueprintSearchInput ) ;
185183 const dispatch = useAppDispatch ( ) ;
186184 const [ localSearchValue , setLocalSearchValue ] = useState (
@@ -190,7 +188,7 @@ const BlueprintSearch = ({ blueprintsTotal }: blueprintSearchProps) => {
190188
191189 useEffect ( ( ) => {
192190 dispatch ( setBlueprintsOffset ( 0 ) ) ;
193- dispatch ( imageBuilderApi . util . invalidateTags ( [ { type : 'Blueprints' } ] ) ) ;
191+ dispatch ( api . backendApi . util . invalidateTags ( [ { type : 'Blueprints' } ] ) ) ;
194192 dispatch (
195193 setBlueprintSearchInput (
196194 debouncedSearchValue . length > 0 ? debouncedSearchValue : undefined ,
0 commit comments