mirror of
https://gitlab.com/megazordpobeda/DataRush.git
synced 2026-05-22 23:17:09 +00:00
input hotfix
This commit is contained in:
@@ -44,6 +44,9 @@ const CompetitionSession = () => {
|
||||
queryClient.invalidateQueries({
|
||||
queryKey: ['solutionHistory', competitionId, taskId]
|
||||
});
|
||||
|
||||
setAnswer("");
|
||||
setSelectedFile(null);
|
||||
},
|
||||
onError: (error) => {
|
||||
console.error("Error submitting solution:", error);
|
||||
|
||||
@@ -40,12 +40,9 @@ const TaskSolution: React.FC<TaskSolutionProps> = ({
|
||||
enabled: !!(competitionId && task.id),
|
||||
});
|
||||
|
||||
// Get the solution history - already sorted from oldest to newest
|
||||
const solutionHistory = solutionsQuery.data || [];
|
||||
|
||||
// Handle task changes
|
||||
useEffect(() => {
|
||||
// If task changed, reset everything and load the latest solution
|
||||
if (taskIdRef.current !== task.id) {
|
||||
setCurrentSolution(null);
|
||||
setSelectedSolutionUrl(null);
|
||||
@@ -115,9 +112,6 @@ const TaskSolution: React.FC<TaskSolutionProps> = ({
|
||||
|
||||
const handleSubmitWrapper = () => {
|
||||
onSubmit();
|
||||
setAnswer("");
|
||||
setSelectedFile(null);
|
||||
setSelectedSolutionUrl(null);
|
||||
};
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user