import { BottomNavWrapper } from './BottomNav.styled'; import { CommentOutlined, ContactsOutlined, UserOutlined } from '@ant-design/icons'; export function BottomNav({ state, actions }) { const tab = () => { if (state.profile || state.account) { return 'profile'; } if (state.cards || state.contact) { return 'cards'; } return 'channels'; } const setChannels = () => { actions.closeDetails(); actions.closeCards(); actions.closeListing(); actions.closeContact(); actions.closeProfile(); actions.closeAccount(); actions.closeConversation(); } const setProfile = () => { actions.closeDetails(); actions.closeCards(); actions.closeListing(); actions.closeContact(); actions.openProfile(); actions.closeConversation(); } const setCards = () => { actions.closeDetails(); actions.openCards(); actions.closeContact(); actions.closeProfile(); actions.closeAccount(); actions.closeConversation(); } return ( { !state.cards && !state.contact && !state.profile && ( )} { (state.cards || state.contact || state.profile) && ( )} { state.profile && ( )} { !state.profile && ( )} { (state.cards || state.contact) && !state.profile && ( )} { ((!state.cards && !state.contact) || state.profile) && ( )} ); }