remove old named files

This commit is contained in:
Abhinav 2022-05-26 14:11:50 +05:30
parent 4fd6c68a44
commit a985fe4bf6
2 changed files with 0 additions and 88 deletions

View file

@ -1,43 +0,0 @@
import React from 'react';
import FileList from 'components/FileList';
import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
import { InProgressItemContainer } from './styledComponents';
import { FileProgresses } from '.';
import {
SectionInfo,
UploadProgressSection,
UploadProgressSectionContent,
UploadProgressSectionTitle,
} from './section';
export interface InProgressProps {
filenames: Map<number, string>;
sectionTitle: string;
fileProgressStatuses: FileProgresses[];
sectionInfo?: any;
}
export const InProgressSection = (props: InProgressProps) => {
const fileList = props.fileProgressStatuses ?? [];
return (
<UploadProgressSection defaultExpanded>
<UploadProgressSectionTitle expandIcon={<ExpandMoreIcon />}>
{props.sectionTitle}
</UploadProgressSectionTitle>
<UploadProgressSectionContent>
{props.sectionInfo && (
<SectionInfo>{props.sectionInfo}</SectionInfo>
)}
<FileList
fileList={fileList.map(({ fileID, progress }) => (
<InProgressItemContainer key={fileID}>
<span>{props.filenames.get(fileID)}</span>
<span className="separator">{`-`}</span>
<span>{`${progress}%`}</span>
</InProgressItemContainer>
))}
/>
</UploadProgressSectionContent>
</UploadProgressSection>
);
};

View file

@ -1,45 +0,0 @@
import React from 'react';
import FileList from 'components/FileList';
import { Typography } from '@mui/material';
import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
import { ResultItemContainer } from './styledComponents';
import { FileUploadResults } from 'constants/upload';
import {
SectionInfo,
UploadProgressSection,
UploadProgressSectionContent,
UploadProgressSectionTitle,
} from './section';
export interface ResultSectionProps {
filenames: Map<number, string>;
fileUploadResultMap: Map<FileUploadResults, number[]>;
fileUploadResult: FileUploadResults;
sectionTitle: any;
sectionInfo?: any;
}
export const ResultSection = (props: ResultSectionProps) => {
const fileList = props.fileUploadResultMap?.get(props.fileUploadResult);
if (!fileList?.length) {
return <></>;
}
return (
<UploadProgressSection>
<UploadProgressSectionTitle expandIcon={<ExpandMoreIcon />}>
<Typography> {props.sectionTitle}</Typography>
</UploadProgressSectionTitle>
<UploadProgressSectionContent>
{props.sectionInfo && (
<SectionInfo>{props.sectionInfo}</SectionInfo>
)}
<FileList
fileList={fileList.map((fileID) => (
<ResultItemContainer key={fileID}>
{props.filenames.get(fileID)}
</ResultItemContainer>
))}
/>
</UploadProgressSectionContent>
</UploadProgressSection>
);
};