mirror of
https://gitlab.com/megazordpobeda/DataRush.git
synced 2026-05-22 23:17:09 +00:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -41,7 +41,7 @@ http_addr =
|
||||
http_port = 3000
|
||||
|
||||
# The public facing domain name used to access grafana from a browser
|
||||
domain = localhost
|
||||
domain = prod-team-15-2pc0i3lc.final.prodcontest.ru
|
||||
|
||||
# Redirect to correct domain if host header does not match domain
|
||||
# Prevents DNS rebinding attacks
|
||||
|
||||
+4
-5
@@ -8,6 +8,7 @@ interface FileSolutionProps {
|
||||
fileInputRef: React.RefObject<HTMLInputElement>;
|
||||
existingFileUrl?: string | null;
|
||||
onClearExistingFile?: () => void; // New prop to clear existing file URL
|
||||
firstSolution: boolean
|
||||
}
|
||||
|
||||
const FileSolution: React.FC<FileSolutionProps> = ({
|
||||
@@ -15,7 +16,8 @@ const FileSolution: React.FC<FileSolutionProps> = ({
|
||||
setSelectedFile,
|
||||
fileInputRef,
|
||||
existingFileUrl = null,
|
||||
onClearExistingFile
|
||||
onClearExistingFile,
|
||||
firstSolution
|
||||
}) => {
|
||||
const handleFileChange = (event: React.ChangeEvent<HTMLInputElement>) => {
|
||||
if (event.target.files && event.target.files[0]) {
|
||||
@@ -59,9 +61,6 @@ const FileSolution: React.FC<FileSolutionProps> = ({
|
||||
}
|
||||
};
|
||||
|
||||
const handleSelectNewFile = () => {
|
||||
fileInputRef.current?.click();
|
||||
};
|
||||
|
||||
const fileName = selectedFile
|
||||
? selectedFile.name
|
||||
@@ -69,7 +68,7 @@ const FileSolution: React.FC<FileSolutionProps> = ({
|
||||
? existingFileUrl.split('/').pop() || 'file'
|
||||
: '';
|
||||
|
||||
const hasFile = !!selectedFile || !!existingFileUrl;
|
||||
const hasFile = !!selectedFile || (!!existingFileUrl && !firstSolution);
|
||||
|
||||
return (
|
||||
<>
|
||||
|
||||
@@ -140,6 +140,7 @@
|
||||
fileInputRef={fileInputRef}
|
||||
existingFileUrl={selectedSolutionUrl}
|
||||
onClearExistingFile={handleClearExistingFile}
|
||||
firstSolution={solutionHistory.length > 0}
|
||||
/>
|
||||
)}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user