import React from "react"; import { useDispatch } from "react-redux"; import CTAIconWrapper from "../components/globals/CTAIconWrapper"; import Header from "../components/globals/Header"; import IconWrapper from "../components/globals/IconWrapper"; import SearchBar from "../components/pages/ChatList/SearchBar"; import ContactItem from "../components/pages/Contacts/ContactItem"; import ActivePage from "../components/pages/Sidebar/ActivePage"; import useContactList from "../hooks/useContactList"; import { sidebarActions } from "../store/sidebarSlice"; import { modalActions } from "../store/modalSlice"; function Contacts() { const dispatch = useDispatch(); const { contacts, handleSearchValue, searchValue } = useContactList(); return (
dispatch( sidebarActions.changeActivePage({ newActivePage: "chatList" }) ) } >
{/* Contacts */}
{!!contacts.length && contacts.map((contact) => ( ))} {!contacts.length && (
)}
dispatch( modalActions.openModal({ type: "newContactForm", positions: {}, }) ) } className="absolute bottom-[2rem] right-[2rem]" >
); } export default Contacts;