bigbuffet-rw/app/soapbox/features/compose/components/upload-progress.tsx
marcin mikołajczak 81de0014d3 Change ESLint rules, lint
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2023-02-16 00:12:02 +01:00

26 lines
591 B
TypeScript

import React from 'react';
import UploadProgress from 'soapbox/components/upload-progress';
import { useCompose } from 'soapbox/hooks';
interface IComposeUploadProgress {
composeId: string
}
/** File upload progress bar for post composer. */
const ComposeUploadProgress: React.FC<IComposeUploadProgress> = ({ composeId }) => {
const compose = useCompose(composeId);
const active = compose.is_uploading;
const progress = compose.progress;
if (!active) {
return null;
}
return (
<UploadProgress progress={progress} />
);
};
export default ComposeUploadProgress;