From 8b77797377f620be43ff8778a4d9e359a0fa6ba4 Mon Sep 17 00:00:00 2001 From: rngsurrounded Date: Mon, 3 Mar 2025 06:06:45 +0900 Subject: [PATCH] styles fix --- .../TaskSolution/components/FileSolution/index.tsx | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/services/frontend/src/pages/CompetitionSession/modules/TaskSolution/components/FileSolution/index.tsx b/services/frontend/src/pages/CompetitionSession/modules/TaskSolution/components/FileSolution/index.tsx index 4be1f55..8f97216 100644 --- a/services/frontend/src/pages/CompetitionSession/modules/TaskSolution/components/FileSolution/index.tsx +++ b/services/frontend/src/pages/CompetitionSession/modules/TaskSolution/components/FileSolution/index.tsx @@ -20,7 +20,6 @@ const FileSolution: React.FC = ({ const handleFileChange = (event: React.ChangeEvent) => { if (event.target.files && event.target.files[0]) { setSelectedFile(event.target.files[0]); - // Clear existing file URL when a new file is selected if (existingFileUrl && onClearExistingFile) { onClearExistingFile(); } @@ -47,25 +46,20 @@ const FileSolution: React.FC = ({ if (e.dataTransfer.files && e.dataTransfer.files[0]) { setSelectedFile(e.dataTransfer.files[0]); - // Clear existing file URL when a new file is dropped if (existingFileUrl && onClearExistingFile) { onClearExistingFile(); } } }; - // Handle clearing the file const handleClearFile = () => { setSelectedFile(null); - // Also clear the existing file URL if it exists if (existingFileUrl && onClearExistingFile) { onClearExistingFile(); } }; - // Handle selecting a new file when an existing file is shown const handleSelectNewFile = () => { - // Just trigger the file input click - the actual clearing will happen in handleFileChange fileInputRef.current?.click(); }; @@ -98,7 +92,7 @@ const FileSolution: React.FC = ({ Скачать @@ -108,7 +102,7 @@ const FileSolution: React.FC = ({ {selectedFile ? (