diff --git a/src/hooks/useProjectData.ts b/src/hooks/useProjectData.ts index f1849ef..3bb704e 100644 --- a/src/hooks/useProjectData.ts +++ b/src/hooks/useProjectData.ts @@ -1,7 +1,18 @@ -// src/hooks/useProjectData.ts +/** + * Project Data Hook + * Custom hook for dynamically loading project data based on current language + */ + import { useTranslation } from 'react-i18next'; import { useState, useEffect } from 'react'; +/** + * Loads project data dynamically based on project ID and current language + * + * @template T - The type of the project data object + * @param {string} projectId - The unique identifier of the project + * @returns {T | null} The project data object or null if loading fails + */ export const useProjectData = (projectId: string): T | null => { const { i18n } = useTranslation(); const [projectData, setProjectData] = useState(null);