title: Hide and Display menu Core UI
body: <p>I integrated the template <strong><code>Core UI</code></strong> in my application.</p>
  <p>The redirection is configured on <strong><code>_nav.js</code></strong> like presented by that picture:</p>
  <p><a href="https://i.stack.imgur.com/ycXiL.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ycXiL.png" alt="enter image description here" /></a></p>
  <p>I'm asking if it's possible to hide or display a menu depending on such condition ?.</p>
  <p>For Exemple: Show <code>Public Student</code> and Hide <code>Manage Convention</code> depending on a condition.</p>
  <p><a href="https://i.stack.imgur.com/SLYGu.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/SLYGu.png" alt="enter image description here" /></a></p>
  <p>The menu is defined on <strong>_nav.js</strong></p>
  <pre><code>export default [
    {
      _tag: 'CSidebarNavTitle',
      _children: ['Menu'],
    },
    {
      _tag: 'CSidebarNavItem',
      name: 'Public Space',
      to: '/home',
    }, // ...
    {
      _tag: 'CSidebarNavItem',
      name: 'Manage Convention',
      to: '/manageConvention',
    }  // ...
  ]
  </code></pre>
  <p>Then, this Array is called on <strong>TheSidebar.js</strong></p>
  <pre><code>import React from 'react'
  import { useSelector, useDispatch } from 'react-redux'
  import { CCreateElement, CSidebar, CSidebarBrand, CSidebarNav, CSidebarNavDivider, CSidebarNavTitle, CSidebarMinimizer, CSidebarNavDropdown, CSidebarNavItem } from '@coreui/react'
  
  import CIcon from '@coreui/icons-react'
  
  // sidebar nav config
  import navigation from './_nav'
  
  const TheSidebar = () =&gt; {
    const dispatch = useDispatch()
    const show = useSelector(state =&gt; state.sidebarShow)
  
    return (
      &lt;CSidebar
        show={show}
        onShowChange={(val) =&gt; dispatch({type: 'set', sidebarShow: val })}
      &gt;
        &lt;CSidebarBrand className=&quot;d-md-down-none&quot; to=&quot;/&quot;&gt;
          &lt;CIcon
            className=&quot;c-sidebar-brand-full&quot;
            name=&quot;logo-negative&quot;
            height={35}
          /&gt;
          &lt;CIcon
            className=&quot;c-sidebar-brand-minimized&quot;
            name=&quot;sygnet&quot;
            height={35}
          /&gt;
        &lt;/CSidebarBrand&gt;
        &lt;CSidebarNav&gt;
  
          &lt;CCreateElement
            items={navigation}
            components={{
              CSidebarNavDivider,
              CSidebarNavDropdown,
              CSidebarNavItem,
              CSidebarNavTitle
            }}
          /&gt;
        &lt;/CSidebarNav&gt;
        &lt;CSidebarMinimizer className=&quot;c-d-md-down-none&quot;/&gt;
      &lt;/CSidebar&gt;
    )
  }
  
  export default React.memo(TheSidebar)
  </code></pre>
  <p>Any suggestion will be appreciated.Big Thanks.</p>