Skip to content

Commit 395ca55

Browse files
FWF:[V8Feature]- Sonar issues fix
1 parent 4da5d4f commit 395ca55

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

forms-flow-components/src/components/CustomComponents/FileUploadArea.tsx

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,14 @@ const FileUploadAreaComponent = forwardRef<HTMLDivElement, FileUploadAreaProps>(
175175
), [fileInputId, handleChange, fileType, t, maxFileSizeMB]);
176176

177177
const renderUploadStatus = useCallback(() => {
178+
let statusText = "";
179+
if (uploadState.isUploading) {
180+
statusText = t(`Importing ${file?.name}`);
181+
} else if (uploadState.isError) {
182+
statusText = t("There was an error in the upload");
183+
} else {
184+
statusText = t("Upload Complete!");
185+
}
178186
return (
179187
<div
180188
className="upload-progress-section"
@@ -193,13 +201,8 @@ const FileUploadAreaComponent = forwardRef<HTMLDivElement, FileUploadAreaProps>(
193201
color={uploadState.isError ? "error" : undefined}
194202
/>
195203
</div>
196-
197204
<p className="upload-status" aria-live="polite">
198-
{uploadState.isUploading
199-
? t(`Importing ${file?.name}`)
200-
: uploadState.isError
201-
? t("There was an error in the upload")
202-
: t("Upload Complete!")}
205+
{statusText}
203206
</p>
204207
</div>
205208
);

forms-flow-theme/scss/v8-scss/_formEditActions.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ $borderRadius: var(--border-radius);
3131
.upload-action-content {
3232
grid-row: 2;
3333
@include mixins.section-content(dashed, $importBackground);
34-
// border: 1px dashed red !important;
3534
}
3635

3736
.actions-contents {

0 commit comments

Comments
 (0)