import { useEffect , useState } from 'react' ; import { Task } from 'ProjectPlanner/types' ; import { api } from 'ProjectPlanner/api' ; export function useTask ( taskId ) { const [ task , setTask ] = useState < Task | null > ( null ) ; return [ task , setTask ] as const ; }