import { useAppDispatch } from "@/redux/hooks";
import { getChats } from "@/redux/slices/chatsSlice";
import { useEffect } from "react";

const FetchData = () => {
  const dispatch = useAppDispatch();
  useEffect(() => {
    dispatch(getChats());
  }, []);
  return null;
};

export default FetchData;
