feat: users online status

This commit is contained in:
zerosoul
2022-02-19 15:57:25 +08:00
parent f96ca44841
commit 656df7c670
10 changed files with 79 additions and 19 deletions
+2 -3
View File
@@ -1,9 +1,8 @@
import { useState, useEffect } from "react";
import { useGetContactsQuery } from "../../app/services/contact";
import { useSelector } from "react-redux";
export default function useFilteredUsers() {
const [input, setInput] = useState("");
const { data: contacts } = useGetContactsQuery();
const contacts = useSelector((store) => store.contacts);
const [filteredUsers, setFilteredUsers] = useState(contacts);
useEffect(() => {
if (!input) {