import { useEffect } from 'react';

export function usePageTitle(title: string, baseSuffix: string = "Espace Paie Odentas") {
  useEffect(() => {
    const fullTitle = title ? `${title} | ${baseSuffix}` : baseSuffix;
    document.title = fullTitle;
  }, [title, baseSuffix]);
}