import { useEffect } from "react";
import { usePage_titleState } from "../zustand/PageTitleState";

const useSetPageTitle = (title: any) => {
  const setPage_title = usePage_titleState((state) => state.setPage_title);

  useEffect(() => {
    setPage_title(title);
  }, [title, setPage_title]);
};

export default useSetPageTitle;
