99 DescribePreferencesResponse ,
1010} from "@raystack/proton/frontier" ;
1111import { ExclamationTriangleIcon } from "@radix-ui/react-icons" ;
12- import { useQueries } from "@tanstack/react-query" ;
12+ import { useQuery } from "@tanstack/react-query" ;
1313import type { ConnectError } from "@connectrpc/connect" ;
1414import PreferencesList from "./index" ;
1515import PreferenceDetails from "./details" ;
@@ -27,17 +27,13 @@ export default function PreferencesView({
2727} : PreferencesViewProps = { } ) {
2828 const transport = useTransport ( ) ;
2929
30- const [ preferencesQuery , traitsQuery ] = useQueries ( {
31- queries : [
32- {
33- ...createQueryOptions ( AdminServiceQueries . listPreferences , { } , { transport } ) ,
34- staleTime : Infinity ,
35- } ,
36- {
37- ...createQueryOptions ( FrontierServiceQueries . describePreferences , { } , { transport } ) ,
38- staleTime : Infinity ,
39- } ,
40- ] ,
30+ const preferencesQuery = useQuery ( {
31+ ...createQueryOptions ( AdminServiceQueries . listPreferences , { } , { transport } ) ,
32+ staleTime : Infinity ,
33+ } ) ;
34+ const traitsQuery = useQuery ( {
35+ ...createQueryOptions ( FrontierServiceQueries . describePreferences , { } , { transport } ) ,
36+ staleTime : Infinity ,
4137 } ) ;
4238
4339 const preferences = ( ( preferencesQuery . data as ListPreferencesResponse ) ?. preferences || [ ] ) as Preference [ ] ;
0 commit comments