bigbuffet-rw/app/soapbox/features/compose/components/upload-progress.tsx

20 lines
528 B
TypeScript

import React from 'react';
import UploadProgress from 'soapbox/components/upload-progress';
import { useAppSelector } from 'soapbox/hooks';
/** File upload progress bar for post composer. */
const ComposeUploadProgress = () => {
const active = useAppSelector((state) => state.compose.get('is_uploading'));
const progress = useAppSelector((state) => state.compose.get('progress'));
if (!active) {
return null;
}
return (
<UploadProgress progress={progress} />
);
};
export default ComposeUploadProgress;