import React from 'react'; import { ProjectInfo } from '@easytwin/core'; import { ProjectApi } from '@/server'; export const useProjectTemplateList = () => { const [templateList, setTemplateList] = React.useState([]); const getTemplateList = React.useCallback(async () => { const list = await ProjectApi.getTemplateList(); setTemplateList(list); }, []); React.useEffect(() => { getTemplateList(); }, [getTemplateList]); return { templateList, }; };