File tree 1 file changed +6
-2
lines changed
1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ const SidebarContext = React.createContext<{
14
14
export const Sidebar : React . FunctionComponent = ( ) => {
15
15
const [ showSidebar , setShowSidebar ] = useState ( false ) ;
16
16
const asyncapi = useSpec ( ) ;
17
+ const config = useConfig ( ) ;
17
18
18
19
const info = asyncapi . info ( ) ;
19
20
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
@@ -23,6 +24,9 @@ export const Sidebar: React.FunctionComponent = () => {
23
24
const schemas = components ?. schemas ( ) . all ( ) ;
24
25
const hasOperations = asyncapi . operations ( ) . length > 0 ;
25
26
27
+ const showMessages = config . show ?. messages ;
28
+ const showSchemas = config . show ?. schemas ;
29
+
26
30
const messagesList = messages ?. length > 0 && (
27
31
< li className = "mb-3 mt-9" >
28
32
< a
@@ -85,8 +89,8 @@ export const Sidebar: React.FunctionComponent = () => {
85
89
</ a >
86
90
< OperationsList />
87
91
</ li >
88
- { messagesList }
89
- { schemasList }
92
+ { showMessages && messagesList }
93
+ { showSchemas && schemasList }
90
94
</ >
91
95
) ;
92
96
You can’t perform that action at this time.
0 commit comments