bigbuffet-rw/app/soapbox/features/compose/components/upload-progress.tsx
marcin mikołajczak 419ab93077 Reducers: TypeScript
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-06-20 21:48:11 +02:00

20 lines
514 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.is_uploading);
const progress = useAppSelector((state) => state.compose.progress);
if (!active) {
return null;
}
return (
<UploadProgress progress={progress} />
);
};
export default ComposeUploadProgress;