import { useMemo } from 'react';

import { type TFunction } from 'i18next';

import { useLokaliseTranslation } from 'src/utils/i18n';

import { articleFormSchema } from '../schemas';

export const useArticleFormSchema = () => {
  const { t } = useLokaliseTranslation('general');

  return useMemo(() => articleFormSchema(t as TFunction), [t]);
};
