WoL Update

This commit is contained in:
Sean Edmunds
2025-01-28 11:51:44 -06:00
parent f2073f951d
commit 6031394c59
8 changed files with 144 additions and 16 deletions

View File

@@ -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,
};
}