Files
iNaturalistReactNative/src/components/SharedComponents/UploadProgressBar.tsx
Amanda Bullington 836876f90d Start uploads directly from multi-observation ObsEdit; show upload progress bar and status text (#2471)
* Build out UI for multiple obs upload status and progress bar

* Show expected number of uploads/uploading in ObsEdit and MyObs progress bars

* Add test for upload progress

* Add tests

* Fix test

* Mock useUploadObservations to fix test

* Maybe fix tests in the cloud

* Reset unsynced number only if realm is still open
2024-11-21 13:14:40 -08:00

22 lines
488 B
TypeScript

import type { Node } from "react";
import React from "react";
import { ProgressBar } from "react-native-paper";
import colors from "styles/tailwindColors";
const PROGRESS_BAR_STYLE = { backgroundColor: "transparent" };
type Props = {
progress: number
}
const UploadProgressBar = ( { progress }: Props ): Node => (
<ProgressBar
progress={progress}
color={colors.inatGreen}
style={PROGRESS_BAR_STYLE}
visible={progress > 0}
/>
);
export default UploadProgressBar;