WoL Update
This commit is contained in:
@@ -56,6 +56,12 @@ export function useCommonHooks() {
|
||||
isFetching: providersIsFetching,
|
||||
isLoading: providersIsLoading,
|
||||
} = useQueryAPI({ endpoint: 'api/providers' });
|
||||
const {
|
||||
data: wolClients,
|
||||
isFetched: wolClientsIsFetched,
|
||||
isFetching: wolClientsIsFetching,
|
||||
isLoading: wolClientsIsLoading,
|
||||
} = useQueryAPI({ endpoint: 'api/wolClients' });
|
||||
const { data: basicWeather } = useWeatherAPI({ endpoint: 'baseline' });
|
||||
const { data: weather } = useWeatherAPI({ endpoint: 'current' });
|
||||
const { data: forecast } = useWeatherAPI({ endpoint: 'forecast' });
|
||||
@@ -147,6 +153,14 @@ export function useCommonHooks() {
|
||||
}
|
||||
}, [providers, providersIsFetched]);
|
||||
|
||||
const [wolClientsData, setWolClientsData] = useState<any>([]);
|
||||
|
||||
useEffect(() => {
|
||||
if (wolClients && wolClientsIsFetched) {
|
||||
setWolClientsData(wolClients);
|
||||
}
|
||||
}, [wolClients, wolClientsIsFetched]);
|
||||
|
||||
return {
|
||||
isMobile,
|
||||
theme,
|
||||
@@ -203,6 +217,11 @@ export function useCommonHooks() {
|
||||
personalIsFetched,
|
||||
personalIsFetching,
|
||||
personalIsLoading,
|
||||
wolClients,
|
||||
wolClientsData,
|
||||
wolClientsIsFetched,
|
||||
wolClientsIsFetching,
|
||||
wolClientsIsLoading,
|
||||
notify,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user