diff --git a/library/src/containers/Sidebar/Sidebar.tsx b/library/src/containers/Sidebar/Sidebar.tsx index abdc54581..a834a2b40 100644 --- a/library/src/containers/Sidebar/Sidebar.tsx +++ b/library/src/containers/Sidebar/Sidebar.tsx @@ -14,6 +14,7 @@ const SidebarContext = React.createContext<{ export const Sidebar: React.FunctionComponent = () => { const [showSidebar, setShowSidebar] = useState(false); const asyncapi = useSpec(); + const config = useConfig(); const info = asyncapi.info(); // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment @@ -23,6 +24,9 @@ export const Sidebar: React.FunctionComponent = () => { const schemas = components?.schemas().all(); const hasOperations = asyncapi.operations().length > 0; + const showMessages = config.show?.messages; + const showSchemas = config.show?.schemas; + const messagesList = messages?.length > 0 && (