diff --git a/components/ScopedBlock/ScopedBlock.tsx b/components/ScopedBlock/ScopedBlock.tsx deleted file mode 100644 index 4f91a82df9..0000000000 --- a/components/ScopedBlock/ScopedBlock.tsx +++ /dev/null @@ -1,15 +0,0 @@ -import { useMemo, useContext } from "react"; -import { DocsContext, getScopes } from "layouts/DocsPage/context"; - -interface ScopedBlockProps { - scope: string | string[]; - children: React.ReactNode; -} - -export const ScopedBlock = ({ scope, children }: ScopedBlockProps) => { - const { scope: currentScope } = useContext(DocsContext); - const scopes = useMemo(() => getScopes(scope), [scope]); - const isInCurrentScope = scopes.includes(currentScope); - - return isInCurrentScope ? <>{children} : null; -}; diff --git a/components/ScopedBlock/index.ts b/components/ScopedBlock/index.ts deleted file mode 100644 index b729fbf34b..0000000000 --- a/components/ScopedBlock/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { ScopedBlock as default } from "./ScopedBlock"; diff --git a/layouts/DocsPage/components.tsx b/layouts/DocsPage/components.tsx index cd7ea91458..1e66feedb5 100644 --- a/layouts/DocsPage/components.tsx +++ b/layouts/DocsPage/components.tsx @@ -3,7 +3,6 @@ import Command, { CommandLine, CommandComment } from "components/Command"; import Icon from "components/Icon"; import InlineCode from "components/InlineCode"; import Notice from "components/Notice"; -import ScopedBlock from "components/ScopedBlock"; import Snippet from "components/Snippet"; import { Tabs, TabItem } from "components/Tabs"; import { @@ -70,7 +69,6 @@ export const components = { commandcomment: CommandComment, icon: Icon, inlinecode: InlineCode, - scopedblock: ScopedBlock, tabs: Tabs, tabitem: TabItem, tile: Tile,