import React from "react"; import { useSolutions } from "@/pages/CompetitionSession/providers/solution-provider.tsx"; import { Spinner } from "@/components/ui/spinner.tsx"; interface InputAnswerProps { content?: string; isLoading: boolean; } export const InputAnswer = ({ content, isLoading }: InputAnswerProps) => { const { answer, updateValue } = useSolutions(); React.useEffect(() => { if (!isLoading) { updateValue(content || ""); } }, [content, isLoading, updateValue]); if (isLoading) { return (
); } return ( updateValue(e.target.value)} /> ); };