From e90ff7867648b3602fe3ef7f98167fbcf41e6326 Mon Sep 17 00:00:00 2001 From: Victor Fernandez de Alba Date: Sun, 17 Mar 2024 21:44:46 +0100 Subject: [PATCH] Phew, fixed PloneClient missing typing --- packages/client/src/index.ts | 4 ++-- packages/providers/src/PloneClient.tsx | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/client/src/index.ts b/packages/client/src/index.ts index d737d9f7ab..827f3c63f6 100644 --- a/packages/client/src/index.ts +++ b/packages/client/src/index.ts @@ -1,3 +1,3 @@ -import ploneClient from './client'; +import PloneClient from './client'; -export default ploneClient; +export default PloneClient; diff --git a/packages/providers/src/PloneClient.tsx b/packages/providers/src/PloneClient.tsx index 2f7eeddaf4..621f797746 100644 --- a/packages/providers/src/PloneClient.tsx +++ b/packages/providers/src/PloneClient.tsx @@ -1,10 +1,10 @@ import * as React from 'react'; -import type PloneClient from '@plone/client'; +import PloneClient from '@plone/client'; -export const PloneClientContext = React.createContext( - undefined, -); +export const PloneClientContext = React.createContext< + InstanceType | undefined +>(undefined); export const usePloneClient = () => { const client = React.useContext(PloneClientContext); @@ -17,7 +17,7 @@ export const usePloneClient = () => { }; export type PloneClientProviderProps = { - client: PloneClient; + client: InstanceType; children?: React.ReactNode; };