From 89b73ba389ef8d650f321cf14e1d066c18a3b091 Mon Sep 17 00:00:00 2001 From: jack zhang <1098626505@qq.com> Date: Sun, 7 Apr 2024 14:29:20 +0800 Subject: [PATCH] fix: template list provider bug (#3950) --- .../SchemaTemplateManagerProvider.tsx | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/packages/core/client/src/schema-templates/SchemaTemplateManagerProvider.tsx b/packages/core/client/src/schema-templates/SchemaTemplateManagerProvider.tsx index 3f2ab48871..979f4e09fe 100644 --- a/packages/core/client/src/schema-templates/SchemaTemplateManagerProvider.tsx +++ b/packages/core/client/src/schema-templates/SchemaTemplateManagerProvider.tsx @@ -122,7 +122,7 @@ export const useSchemaTemplateManager = () => { }; }; -const Internal = (props) => { +export const RemoteSchemaTemplateManagerProvider = (props) => { const api = useAPIClient(); const { render } = useAppSpin(); const options = { @@ -153,19 +153,10 @@ const Internal = (props) => { ); }; -export const RemoteSchemaTemplateManagerProvider: React.FC<{ children?: ReactNode }> = (props) => { - const location = useLocation(); - if (location.pathname.startsWith('/admin')) { - return ; - } - return <>{props.children}; -}; - export class RemoteSchemaTemplateManagerPlugin extends Plugin { async load() { this.addRoutes(); this.addComponents(); - this.app.use(RemoteSchemaTemplateManagerProvider); } addComponents() {