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

21 lines
528 B
TypeScript
Raw Normal View History

2022-03-30 07:51:07 -07:00
import React from 'react';
import UploadProgress from 'soapbox/components/upload-progress';
2022-03-30 07:51:07 -07:00
import { useAppSelector } from 'soapbox/hooks';
/** File upload progress bar for post composer. */
const ComposeUploadProgress = () => {
2022-03-30 07:51:07 -07:00
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} />
2022-03-30 07:51:07 -07:00
);
};
export default ComposeUploadProgress;