import { Helmet } from 'react-helmet-async';

import useCustomServerTranslation from 'src/hooks/useCustomServerTranslation';
import { formatTitle } from 'src/utils/helmetUtils';
import itemsConfig from 'src/components/dashboard/sidebar/constants';
const { titleTranslationKey } = itemsConfig.timeOff;

export const TimeOffHelmet = () => {
  const title = useCustomServerTranslation({
    module: 'TIME_OFF',
    defaultTranslationKey: titleTranslationKey,
    namespace: 'dashboard_sidebar_app',
  });
  return (
    <Helmet>
      <title>{formatTitle(title)}</title>
    </Helmet>
  );
};
