import { useSelector } from 'react-redux'
import SearchList from './SearchList'
import CredentialsList from './CredentialsList'
import { getIsOpen } from '../../../../../redux/control/selector'


const RightLists = () => {
  const isOpen = useSelector(getIsOpen)
  return (
    <div>
      {isOpen === 'credentials' &&<CredentialsList/>}
      {isOpen === 'search' && <SearchList/>}
  </div>
   )
}

export default RightLists