diff --git a/components/Admonition/Admonition.tsx b/components/Admonition/Admonition.tsx index 7186bbdcdd..c8dbe236a5 100644 --- a/components/Admonition/Admonition.tsx +++ b/components/Admonition/Admonition.tsx @@ -1,6 +1,6 @@ import cn from "classnames"; import { useContext, useMemo } from "react"; -import { DocsContext, getScopes } from "layouts/DocsPage/context"; +import { DocsContext } from "layouts/DocsPage/context"; import styles from "./Admonition.module.css"; const capitalize = (text: string): string => @@ -12,7 +12,6 @@ export interface AdmonitionProps { type: (typeof types)[number]; title: string; children: React.ReactNode; - scopeOnly: boolean; scope?: string | string[]; } @@ -20,23 +19,12 @@ const Admonition = ({ type = "tip", title, children, - scopeOnly = false, scope, }: AdmonitionProps) => { const resolvedType = type && types.includes(type) ? type : "tip"; - const { scope: currentScope } = useContext(DocsContext); - const scopes = useMemo(() => getScopes(scope), [scope]); - const isInCurrentScope = scopes.includes(currentScope); - const isHidden = scopeOnly && !isInCurrentScope; return ( -