From 896b8ef3262558c578a027f61c58660bfb7d3f35 Mon Sep 17 00:00:00 2001 From: gitlawr Date: Fri, 8 May 2026 14:32:20 +0800 Subject: [PATCH] feat: expose useTableFetch via CoreUIProvider MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Inject the host's `useTableFetch` hook into the CoreUIProvider's `hooks` prop alongside the already-wired `useCurrentUser`, so plugins that import `useTableFetch` from `@gpustack/core-ui` resolve it through the host instead of throwing "`hooks.useTableFetch is not a function`" at the first list-page render. Companion to the earlier `feat: add use current user` change — core-ui exposes both hooks as host-injected, but only the user hook had been plumbed. --- src/layouts/index.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/layouts/index.tsx b/src/layouts/index.tsx index df8d947b..65006030 100644 --- a/src/layouts/index.tsx +++ b/src/layouts/index.tsx @@ -5,6 +5,7 @@ import routeCachekey from '@/config/route-cachekey'; import { DEFAULT_ENTER_PAGE, GPUSTACK_API_BASE_URL } from '@/config/settings'; import { COLOR_PRIMARY } from '@/config/theme'; import useCurrentUser from '@/hooks/use-current-user'; +import useTableFetch from '@/hooks/use-table-fetch'; import useUserSettings from '@/hooks/use-user-settings'; import useUserSettingsStorage from '@/hooks/use-user-settings-storage'; import useAddResource from '@/pages/dashboard/hooks/use-add-resource'; @@ -349,7 +350,8 @@ export default (props: any) => { useUserSettings, useUserSettingsStorage, useIntl, - useCurrentUser + useCurrentUser, + useTableFetch }} i18n={intl} locale={{