mirror of
https://github.com/inaturalist/iNaturalistReactNative.git
synced 2026-05-04 21:53:59 -04:00
* 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
22 lines
488 B
TypeScript
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;
|