auto-claude: subtask-4-3 - Add JSDoc to useProjectData.ts hook

This commit is contained in:
2026-01-25 12:00:57 +01:00
parent 0a69a9bfbf
commit a4f7db006e
+12 -1
View File
@@ -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 { useTranslation } from 'react-i18next';
import { useState, useEffect } from 'react'; 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 = <T = unknown>(projectId: string): T | null => { export const useProjectData = <T = unknown>(projectId: string): T | null => {
const { i18n } = useTranslation(); const { i18n } = useTranslation();
const [projectData, setProjectData] = useState<T | null>(null); const [projectData, setProjectData] = useState<T | null>(null);