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

21 lines
514 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 = () => {
const active = useAppSelector((state) => state.compose.is_uploading);
const progress = useAppSelector((state) => state.compose.progress);
2022-03-30 07:51:07 -07:00
if (!active) {
return null;
}
return (
<UploadProgress progress={progress} />
2022-03-30 07:51:07 -07:00
);
};
export default ComposeUploadProgress;