mirror of https://github.com/msgbyte/tailchat
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
334 B
TypeScript
14 lines
334 B
TypeScript
import { fetchAvailableServices } from '../../model/common';
|
|
import { useAsync } from '../useAsync';
|
|
|
|
/**
|
|
* 用于监测服务是否可用的hooks
|
|
*/
|
|
export function useAvailableServices() {
|
|
const { loading, value: availableServices } = useAsync(() =>
|
|
fetchAvailableServices()
|
|
);
|
|
|
|
return { loading, availableServices };
|
|
}
|