diff --git a/plugins/search-react/src/context/SearchContext.tsx b/plugins/search-react/src/context/SearchContext.tsx index 7da4785fdd..6f8067805c 100644 --- a/plugins/search-react/src/context/SearchContext.tsx +++ b/plugins/search-react/src/context/SearchContext.tsx @@ -53,11 +53,7 @@ export type SearchContextState = { pageCursor?: string; }; -// TODO(@backstage/techdocs-core): stop export this publicly when deprecating the context in @backstage/plugin-techdocs. -/** - * @public - */ -export const SearchContext = createVersionedContext<{ +const SearchContext = createVersionedContext<{ 1: SearchContextValue; }>('search-context'); @@ -72,7 +68,7 @@ export const useSearch = () => { const value = context.atVersion(1); if (!value) { - throw new Error('No context for version 1 found'); + throw new Error('No SearchContext v1 found'); } return value; }; diff --git a/plugins/search-react/src/context/index.tsx b/plugins/search-react/src/context/index.tsx index f2ea486e9d..330da035d6 100644 --- a/plugins/search-react/src/context/index.tsx +++ b/plugins/search-react/src/context/index.tsx @@ -14,11 +14,7 @@ * limitations under the License. */ -export { - SearchContextProvider, - SearchContext, - useSearch, -} from './SearchContext'; +export { SearchContextProvider, useSearch } from './SearchContext'; export type { SearchContextState } from './SearchContext'; export { SearchContextProvider as SearchContextProviderForStorybook,