import { useNavigate } from "react-router"; import { useSupervisorQuestions } from "../contexts/SupervisorQuestionsContext"; export function SupervisorQuestionNotification() { const navigate = useNavigate(); const { notificationQuestions, dismissNotification } = useSupervisorQuestions(); // Filter out contract_complete questions - they are displayed on the task page instead const filteredQuestions = notificationQuestions.filter( (q) => q.questionType !== "contract_complete" ); if (filteredQuestions.length === 0) { return null; } const handleGoToTask = (questionId: string, taskId: string) => { dismissNotification(questionId); navigate(`/mesh/${taskId}`); }; return (
{question.question}