mirror of
https://github.com/inaturalist/iNaturalistReactNative.git
synced 2025-12-23 22:18:36 -05:00
MOB-1039 demonstrate stylistic rule w/ autofix test
This commit is contained in:
@@ -24,7 +24,7 @@ type ObsCreateItem = {
|
||||
testID: string,
|
||||
accessibilityLabel: string,
|
||||
accessibilityHint: string
|
||||
}
|
||||
};
|
||||
|
||||
const majorVersionIOS = parseInt( String( Platform.Version ), 10 );
|
||||
const AI_CAMERA_SUPPORTED = ( Platform.OS === "ios" && majorVersionIOS >= 11 )
|
||||
|
||||
@@ -16,7 +16,7 @@ type Props = {
|
||||
photosTaken: boolean,
|
||||
rotatableAnimatedStyle: Object,
|
||||
takePhoto: ( ) => void,
|
||||
}
|
||||
};
|
||||
|
||||
const CameraNavButtons = ( {
|
||||
disabled,
|
||||
|
||||
@@ -26,7 +26,7 @@ type Props = {
|
||||
takePhotoOptions: Object,
|
||||
zoomTextValue: string,
|
||||
showZoomButton: boolean
|
||||
}
|
||||
};
|
||||
|
||||
const CameraOptionsButtons = ( {
|
||||
takePhoto,
|
||||
|
||||
@@ -11,7 +11,7 @@ type Props = {
|
||||
setShowDiscardSheet: Function,
|
||||
hidden?: boolean,
|
||||
onDiscard: Function
|
||||
}
|
||||
};
|
||||
|
||||
const DiscardChangesSheet = ( {
|
||||
setShowDiscardSheet,
|
||||
|
||||
@@ -7,7 +7,7 @@ const logger = log.extend( "CameraView" );
|
||||
|
||||
type Event = {
|
||||
log: string;
|
||||
}
|
||||
};
|
||||
|
||||
const handleClassifierError = ( error: CameraRuntimeError ) => {
|
||||
// When we hit this error, there is an error with the classifier.
|
||||
|
||||
@@ -13,7 +13,7 @@ import RNFS from "react-native-fs";
|
||||
export type DirectoryEntrySize = {
|
||||
name: string;
|
||||
size: number;
|
||||
}
|
||||
};
|
||||
|
||||
// https://stackoverflow.com/questions/15900485/correct-way-to-convert-size-in-bytes-to-kb-mb-gb-in-javascript
|
||||
export function formatSizeUnits( bytes: number ) {
|
||||
@@ -122,7 +122,7 @@ export function getTotalDirectorySize( directoryItems: DirectoryEntrySize[] ): n
|
||||
|
||||
type AppSize = {
|
||||
[directoryName: string]: DirectoryEntrySize[]
|
||||
}
|
||||
};
|
||||
|
||||
async function fetchAppSize(): Promise<AppSize> {
|
||||
const maybeExistingDirectories = await Promise.all(
|
||||
|
||||
@@ -66,7 +66,7 @@ type Props = {
|
||||
updateProject: Function,
|
||||
updateTaxon: Function,
|
||||
updateUser: Function
|
||||
}
|
||||
};
|
||||
|
||||
const Explore = ( {
|
||||
canFetch,
|
||||
|
||||
@@ -35,7 +35,7 @@ type Props = {
|
||||
requestLocationPermissions: Function,
|
||||
updateLocation: Function,
|
||||
updateTaxon: Function
|
||||
}
|
||||
};
|
||||
|
||||
const Header = ( {
|
||||
count,
|
||||
|
||||
@@ -17,7 +17,7 @@ type Props = {
|
||||
exploreViewIcon: string,
|
||||
isFetching: boolean,
|
||||
onPress: Function,
|
||||
}
|
||||
};
|
||||
|
||||
const ExploreHeaderCount = ( {
|
||||
count,
|
||||
|
||||
@@ -31,7 +31,7 @@ type Props = {
|
||||
hasLocationPermissions?: boolean,
|
||||
renderLocationPermissionsGate: Function,
|
||||
requestLocationPermissions: Function
|
||||
}
|
||||
};
|
||||
|
||||
const OBS_LIST_CONTAINER_STYLE = { paddingTop: 50 };
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ type Props = {
|
||||
isConnected: boolean,
|
||||
queryParams: Object,
|
||||
handleUpdateCount: Function
|
||||
}
|
||||
};
|
||||
|
||||
const SpeciesView = ( {
|
||||
canFetch,
|
||||
|
||||
@@ -59,18 +59,18 @@ type FullPageWebViewParams = {
|
||||
skipSetSourceInShouldStartLoadWithRequest?: boolean;
|
||||
clickablePathnames?: Array<string>;
|
||||
shouldLoadUrl?: ( url: string ) => boolean;
|
||||
}
|
||||
};
|
||||
|
||||
type ParamList = {
|
||||
FullPageWebView: FullPageWebViewParams
|
||||
}
|
||||
};
|
||||
|
||||
type WebViewSource = {
|
||||
uri: string;
|
||||
headers?: {
|
||||
Authorization?: string | null
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export function onShouldStartLoadWithRequest(
|
||||
request: ShouldStartLoadRequest,
|
||||
|
||||
@@ -18,7 +18,7 @@ import LoginSignUpInputField from "./LoginSignUpInputField";
|
||||
type Props = {
|
||||
reset: ( email: string ) => Promise<void>,
|
||||
scrollViewRef?: { current: null | ElementRef<typeof ScrollView> },
|
||||
}
|
||||
};
|
||||
|
||||
const ForgotPasswordForm = ( { reset, scrollViewRef }: Props ): Node => {
|
||||
const [email, setEmail] = useState( "" );
|
||||
|
||||
@@ -39,7 +39,7 @@ interface LoginFormParams {
|
||||
|
||||
type ParamList = {
|
||||
LoginFormParams: LoginFormParams
|
||||
}
|
||||
};
|
||||
|
||||
const LoginForm = ( {
|
||||
scrollViewRef
|
||||
|
||||
@@ -21,7 +21,7 @@ type Props = {
|
||||
testID?: string,
|
||||
updateMaxHeight?: ( height: number ) => void,
|
||||
forcedHeight: number
|
||||
}
|
||||
};
|
||||
|
||||
const SuggestionsResult = ( {
|
||||
confidence,
|
||||
|
||||
@@ -19,7 +19,7 @@ type Props = {
|
||||
taxon: RealmTaxon | ApiTaxon,
|
||||
testID?: string,
|
||||
selected?: boolean
|
||||
}
|
||||
};
|
||||
|
||||
const IconicSuggestion = ( {
|
||||
fetchRemote = true,
|
||||
|
||||
@@ -38,7 +38,7 @@ type Props = {
|
||||
scrollRef: Object,
|
||||
iconicTaxon: Object,
|
||||
setIconicTaxon: ( ) => void
|
||||
}
|
||||
};
|
||||
|
||||
const Match = ( {
|
||||
observation,
|
||||
|
||||
@@ -16,7 +16,7 @@ type Props = {
|
||||
taxon: Object,
|
||||
obsPhotos: Array<Object>,
|
||||
navToTaxonDetails: ( photo: Object ) => void
|
||||
}
|
||||
};
|
||||
|
||||
const PhotosSection = ( {
|
||||
representativePhoto,
|
||||
|
||||
@@ -14,7 +14,7 @@ const DROP_SHADOW = getShadow( {
|
||||
|
||||
type Props = {
|
||||
handlePress: Function
|
||||
}
|
||||
};
|
||||
|
||||
const SaveDiscardButtons = ( {
|
||||
handlePress
|
||||
|
||||
@@ -43,7 +43,7 @@ type Props = {
|
||||
}>,
|
||||
selectedMediaIndex: number,
|
||||
setSelectedMediaIndex: Function
|
||||
}
|
||||
};
|
||||
|
||||
const MainMediaDisplay = ( {
|
||||
autoPlaySound,
|
||||
|
||||
@@ -25,7 +25,7 @@ type Props = {
|
||||
sounds?: Array<{
|
||||
file_url: string
|
||||
}>,
|
||||
}
|
||||
};
|
||||
|
||||
const SMALL_ITEM_CLASS = "rounded-sm w-[42px] h-[42px] mx-[6px] my-[12px]";
|
||||
const LARGE_ITEM_CLASS = "rounded-md w-[83px] h-[83px] mx-[10px] my-[20px]";
|
||||
|
||||
@@ -41,7 +41,7 @@ type Props = {
|
||||
file_url: string
|
||||
}>,
|
||||
uri?: string | null
|
||||
}
|
||||
};
|
||||
|
||||
const MediaViewer = ( {
|
||||
autoPlaySound,
|
||||
|
||||
@@ -26,7 +26,7 @@ type Props = {
|
||||
}>,
|
||||
showModal: boolean,
|
||||
uri?: string | null
|
||||
}
|
||||
};
|
||||
|
||||
const MediaViewerModal = ( {
|
||||
autoPlaySound,
|
||||
|
||||
@@ -44,7 +44,7 @@ const AutoheightWebView = ( webshellProps ): Node => {
|
||||
|
||||
type Props = {
|
||||
isConnected: boolean
|
||||
}
|
||||
};
|
||||
|
||||
const Announcements = ( {
|
||||
isConnected
|
||||
|
||||
@@ -19,7 +19,7 @@ const DROP_SHADOW = getShadow( {
|
||||
|
||||
type Props = {
|
||||
currentUser: RealmUser | null;
|
||||
}
|
||||
};
|
||||
|
||||
const LoginBanner = ( {
|
||||
currentUser
|
||||
|
||||
@@ -25,7 +25,7 @@ type Props = {
|
||||
styling: string
|
||||
},
|
||||
stopAllUploads: Function
|
||||
}
|
||||
};
|
||||
|
||||
const SimpleUploadBanner = ( {
|
||||
error,
|
||||
|
||||
@@ -27,7 +27,7 @@ type Props = {
|
||||
numUploadableObservations: number,
|
||||
handleSyncButtonPress: Function,
|
||||
currentUser: Object
|
||||
}
|
||||
};
|
||||
|
||||
const SimpleUploadBannerContainer = ( {
|
||||
handleSyncButtonPress,
|
||||
|
||||
@@ -29,7 +29,7 @@ type Props = {
|
||||
geoprivacy: string,
|
||||
taxonGeoprivacy: string,
|
||||
belongsToCurrentUser: boolean
|
||||
}
|
||||
};
|
||||
|
||||
const ActivityHeader = ( {
|
||||
classNameMargin,
|
||||
|
||||
@@ -18,7 +18,7 @@ type Props = {
|
||||
geoprivacy: string,
|
||||
taxonGeoprivacy: string,
|
||||
belongsToCurrentUser: boolean
|
||||
}
|
||||
};
|
||||
|
||||
const ActivityHeaderContainer = ( {
|
||||
classNameMargin,
|
||||
|
||||
@@ -15,7 +15,7 @@ type Props = {
|
||||
setShowEditCommentSheet: Function,
|
||||
setShowWithdrawIDSheet: Function,
|
||||
updateIdentification: Function,
|
||||
}
|
||||
};
|
||||
|
||||
const ActivityItemKebabMenu = ( {
|
||||
current,
|
||||
|
||||
@@ -27,7 +27,7 @@ type Props = {
|
||||
geoprivacy: string,
|
||||
taxonGeoprivacy: string,
|
||||
belongsToCurrentUser: boolean
|
||||
}
|
||||
};
|
||||
|
||||
const ActivityItem = ( {
|
||||
currentUserId,
|
||||
|
||||
@@ -17,7 +17,7 @@ type Props = {
|
||||
targetItemID: number,
|
||||
// TODO change to LayoutEvent from react-native if/when switching to TS
|
||||
onLayoutTargetItem: ( event: Object ) => void
|
||||
}
|
||||
};
|
||||
|
||||
const ActivityTab = ( {
|
||||
observation,
|
||||
|
||||
@@ -19,7 +19,7 @@ type Props = {
|
||||
navToSuggestions: Function,
|
||||
showAddCommentSheet: Function,
|
||||
openAddCommentSheet: Function
|
||||
}
|
||||
};
|
||||
|
||||
const FloatingButtons = ( {
|
||||
navToSuggestions,
|
||||
|
||||
@@ -54,7 +54,7 @@ type Props = {
|
||||
removeNeedsIDVote: Function,
|
||||
setMetricVote: Function,
|
||||
setNeedsIDVote: Function,
|
||||
}
|
||||
};
|
||||
|
||||
const DataQualityAssessment = ( {
|
||||
checkTest,
|
||||
|
||||
@@ -18,7 +18,7 @@ type Props = {
|
||||
loadingMetric: ?string,
|
||||
setVote: Function,
|
||||
removeVote: Function
|
||||
}
|
||||
};
|
||||
|
||||
const getUserVote = ( currentUser, metric, votes ) => {
|
||||
if ( votes && votes.length > 0 ) {
|
||||
|
||||
@@ -12,7 +12,7 @@ import ObscurationExplanation from "./ObscurationExplanation";
|
||||
type Props = {
|
||||
currentUser: { id: number },
|
||||
observation: Object
|
||||
}
|
||||
};
|
||||
|
||||
const DetailsMapHeader = ( {
|
||||
currentUser,
|
||||
|
||||
@@ -27,7 +27,7 @@ import ProjectSection from "./ProjectSection";
|
||||
type Props = {
|
||||
currentUser: Object,
|
||||
observation: Object
|
||||
}
|
||||
};
|
||||
|
||||
const OBSERVATION_URL = "https://www.inaturalist.org/observations";
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ type Props = {
|
||||
currentUser?: Object,
|
||||
afterToggleFave: Function,
|
||||
top?: boolean
|
||||
}
|
||||
};
|
||||
|
||||
const FaveButton = ( {
|
||||
observation,
|
||||
|
||||
@@ -73,7 +73,7 @@ type Props = {
|
||||
},
|
||||
onChangeIdentBody?: Function,
|
||||
uuid: string
|
||||
}
|
||||
};
|
||||
|
||||
const ObsDetails = ( {
|
||||
activityItems,
|
||||
|
||||
@@ -20,7 +20,7 @@ type Props = {
|
||||
belongsToCurrentUser: boolean,
|
||||
isConnected: boolean,
|
||||
observation: Object,
|
||||
}
|
||||
};
|
||||
|
||||
const ObsDetailsOverview = ( {
|
||||
belongsToCurrentUser,
|
||||
|
||||
@@ -23,7 +23,7 @@ type Props = {
|
||||
file_url: string
|
||||
}>,
|
||||
tablet: boolean
|
||||
}
|
||||
};
|
||||
|
||||
const ObsMedia = ( {
|
||||
loading,
|
||||
|
||||
@@ -19,7 +19,7 @@ type Props = {
|
||||
photos: Array<Object>,
|
||||
sounds: Array<Object>,
|
||||
tablet: boolean
|
||||
}
|
||||
};
|
||||
|
||||
const ObsMediaDisplay = ( {
|
||||
loading,
|
||||
|
||||
@@ -8,7 +8,7 @@ import ObsMediaDisplay from "./ObsMediaDisplay";
|
||||
type Props = {
|
||||
observation: Object,
|
||||
tablet?: boolean
|
||||
}
|
||||
};
|
||||
|
||||
// TODO replace this hack. Without this you get errors about the
|
||||
// photo objects being invalidated down in ObsMedia, but the
|
||||
|
||||
@@ -22,7 +22,7 @@ type Props = {
|
||||
},
|
||||
onAgree:Function,
|
||||
onPressClose: Function,
|
||||
}
|
||||
};
|
||||
|
||||
const showTaxon = taxon => {
|
||||
if ( !taxon ) {
|
||||
|
||||
@@ -14,7 +14,7 @@ type Props = {
|
||||
onPressClose: Function,
|
||||
updateIdentification: Function,
|
||||
taxon: Object
|
||||
}
|
||||
};
|
||||
|
||||
const showTaxon = taxon => {
|
||||
if ( !taxon ) {
|
||||
|
||||
@@ -29,7 +29,7 @@ type Props = {
|
||||
geoprivacy: string,
|
||||
taxonGeoprivacy: string,
|
||||
belongsToCurrentUser: boolean
|
||||
}
|
||||
};
|
||||
|
||||
const ActivityHeader = ( {
|
||||
classNameMargin,
|
||||
|
||||
@@ -18,7 +18,7 @@ type Props = {
|
||||
geoprivacy: string,
|
||||
taxonGeoprivacy: string,
|
||||
belongsToCurrentUser: boolean
|
||||
}
|
||||
};
|
||||
|
||||
const ActivityHeaderContainer = ( {
|
||||
classNameMargin,
|
||||
|
||||
@@ -29,7 +29,7 @@ type Props = {
|
||||
taxonGeoprivacy: string,
|
||||
belongsToCurrentUser: boolean,
|
||||
showExplainerText: boolean
|
||||
}
|
||||
};
|
||||
|
||||
const ActivityItem = ( {
|
||||
currentUserId,
|
||||
|
||||
@@ -17,7 +17,7 @@ type Props = {
|
||||
targetItemID: number,
|
||||
// TODO change to LayoutEvent from react-native if/when switching to TS
|
||||
onLayoutTargetItem: ( event: Object ) => void
|
||||
}
|
||||
};
|
||||
|
||||
const CommunitySection = ( {
|
||||
observation,
|
||||
|
||||
@@ -19,7 +19,7 @@ type Props = {
|
||||
navToSuggestions: Function,
|
||||
showAddCommentSheet: Function,
|
||||
openAddCommentSheet: Function
|
||||
}
|
||||
};
|
||||
|
||||
const FloatingButtons = ( {
|
||||
navToSuggestions,
|
||||
|
||||
@@ -20,7 +20,7 @@ type Props = {
|
||||
belongsToCurrentUser: boolean,
|
||||
isSimpleMode: boolean,
|
||||
observation: Object,
|
||||
}
|
||||
};
|
||||
|
||||
const CommunityTaxon = ( {
|
||||
belongsToCurrentUser,
|
||||
|
||||
@@ -7,7 +7,7 @@ import React from "react";
|
||||
|
||||
type Props = {
|
||||
observation: Object
|
||||
}
|
||||
};
|
||||
|
||||
const renderRestrictions = ( licenseCode: string ) => {
|
||||
switch ( licenseCode ) {
|
||||
|
||||
@@ -17,7 +17,7 @@ import GeoprivacyStatus from "./GeoprivacyStatus";
|
||||
|
||||
type Props = {
|
||||
observation: Object
|
||||
}
|
||||
};
|
||||
|
||||
const DetailsSection = ( { observation }: Props ): Node => {
|
||||
const application = observation?.application?.name;
|
||||
|
||||
@@ -17,7 +17,7 @@ type Props = {
|
||||
uuid: string,
|
||||
refetchSubscriptions: Function,
|
||||
subscriptions: Object
|
||||
}
|
||||
};
|
||||
|
||||
const HeaderKebabMenu = ( {
|
||||
observationId,
|
||||
|
||||
@@ -13,7 +13,7 @@ import React from "react";
|
||||
type Props = {
|
||||
currentUser: { id: number },
|
||||
observation: Object
|
||||
}
|
||||
};
|
||||
|
||||
const DetailsMapHeader = ( {
|
||||
currentUser,
|
||||
|
||||
@@ -15,7 +15,7 @@ import ViewInBrowserButton from "./ViewInBrowserButton";
|
||||
|
||||
type Props = {
|
||||
observation: Object
|
||||
}
|
||||
};
|
||||
|
||||
const MoreSection = ( { observation }: Props ): Node => {
|
||||
const observationUUID = observation?.uuid;
|
||||
|
||||
@@ -8,7 +8,7 @@ import { Alert, Platform, Share } from "react-native";
|
||||
|
||||
type Props = {
|
||||
id: number
|
||||
}
|
||||
};
|
||||
|
||||
const OBSERVATION_URL = "https://www.inaturalist.org/observations";
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ type Props = {
|
||||
targetActivityItemID: number,
|
||||
wasSynced: boolean,
|
||||
uuid: string
|
||||
}
|
||||
};
|
||||
|
||||
const ObsDetailsDefaultMode = ( {
|
||||
activityItems = [],
|
||||
|
||||
@@ -21,7 +21,7 @@ type Props = {
|
||||
sounds?: Array<{
|
||||
file_url: string
|
||||
}>
|
||||
}
|
||||
};
|
||||
|
||||
const ObsMedia = ( {
|
||||
loading,
|
||||
|
||||
@@ -18,7 +18,7 @@ type Props = {
|
||||
loading: boolean,
|
||||
photos: Array<Object>,
|
||||
sounds: Array<Object>
|
||||
}
|
||||
};
|
||||
|
||||
const ObsMediaDisplay = ( {
|
||||
loading,
|
||||
|
||||
@@ -7,7 +7,7 @@ import ObsMediaDisplay from "./ObsMediaDisplay";
|
||||
|
||||
type Props = {
|
||||
observation: Object
|
||||
}
|
||||
};
|
||||
|
||||
// TODO replace this hack. Without this you get errors about the
|
||||
// photo objects being invalidated down in ObsMedia, but the
|
||||
|
||||
@@ -12,7 +12,7 @@ type Props = {
|
||||
belongsToCurrentUser: boolean,
|
||||
isConnected: boolean,
|
||||
observation: Object,
|
||||
}
|
||||
};
|
||||
|
||||
const ObserverDetails = ( {
|
||||
belongsToCurrentUser,
|
||||
|
||||
@@ -22,7 +22,7 @@ type Props = {
|
||||
},
|
||||
onAgree:Function,
|
||||
onPressClose: Function,
|
||||
}
|
||||
};
|
||||
|
||||
const showTaxon = taxon => {
|
||||
if ( !taxon ) {
|
||||
|
||||
@@ -12,7 +12,7 @@ import React from "react";
|
||||
|
||||
type Props = {
|
||||
observation: Object
|
||||
}
|
||||
};
|
||||
|
||||
const StatusSection = ( { observation }: Props ): Node => {
|
||||
if ( !observation ) return null;
|
||||
|
||||
@@ -28,7 +28,7 @@ type Props = {
|
||||
showFocusedUploadButton: boolean
|
||||
showHalfOpacity: boolean,
|
||||
wasSynced: boolean,
|
||||
}
|
||||
};
|
||||
|
||||
const BottomButtons = ( {
|
||||
buttonPressed,
|
||||
|
||||
@@ -29,7 +29,7 @@ type Props = {
|
||||
setCurrentObservationIndex: Function,
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
|
||||
transitionAnimation: Function
|
||||
}
|
||||
};
|
||||
|
||||
const BottomButtonsContainer = ( {
|
||||
passesEvidenceTest,
|
||||
|
||||
@@ -34,7 +34,7 @@ type Props = {
|
||||
},
|
||||
uuid: string
|
||||
}>
|
||||
}
|
||||
};
|
||||
|
||||
const EvidenceList = ( {
|
||||
handleAddEvidence,
|
||||
|
||||
@@ -34,7 +34,7 @@ type Props = {
|
||||
}>,
|
||||
onLocationPress: ( ) => void,
|
||||
updateObservationKeys: Function
|
||||
}
|
||||
};
|
||||
|
||||
const EvidenceSection = ( {
|
||||
currentObservation,
|
||||
|
||||
@@ -26,7 +26,7 @@ type Props = {
|
||||
passesEvidenceTest: boolean,
|
||||
setPassesEvidenceTest: Function,
|
||||
updateObservationKeys: Function
|
||||
}
|
||||
};
|
||||
|
||||
const EvidenceSectionContainer = ( {
|
||||
currentObservation,
|
||||
|
||||
@@ -24,7 +24,7 @@ type Props = {
|
||||
resetScreen: boolean,
|
||||
setResetScreen: Function,
|
||||
updateObservationKeys: Function
|
||||
}
|
||||
};
|
||||
|
||||
const IdentificationSection = ( {
|
||||
currentObservation,
|
||||
|
||||
@@ -14,7 +14,7 @@ type Props = {
|
||||
setResetScreen: Function,
|
||||
transitionAnimation: Function,
|
||||
transitionAnimationRef: Object
|
||||
}
|
||||
};
|
||||
|
||||
const MultipleObservationsArrows = ( {
|
||||
currentObservationIndex,
|
||||
|
||||
@@ -23,7 +23,7 @@ const { useRealm } = RealmContext;
|
||||
type Props = {
|
||||
observations: Array<Object>,
|
||||
currentObservation: Object
|
||||
}
|
||||
};
|
||||
|
||||
const ObsEditHeader = ( {
|
||||
observations,
|
||||
|
||||
@@ -15,7 +15,7 @@ import WildStatusSheet from "./Sheets/WildStatusSheet";
|
||||
type Props = {
|
||||
currentObservation: Object,
|
||||
updateObservationKeys: Function
|
||||
}
|
||||
};
|
||||
|
||||
const OtherDataSection = ( {
|
||||
currentObservation,
|
||||
|
||||
@@ -13,7 +13,7 @@ type Props = {
|
||||
disableAddingMoreEvidence: boolean,
|
||||
hidden?: boolean,
|
||||
onClose: Function
|
||||
}
|
||||
};
|
||||
|
||||
const AddEvidenceSheet = ( {
|
||||
disableAddingMoreEvidence,
|
||||
|
||||
@@ -18,7 +18,7 @@ type Props = {
|
||||
observations: Array<Object>,
|
||||
onDelete?: Function,
|
||||
updateObservations: Function
|
||||
}
|
||||
};
|
||||
|
||||
const DeleteObservationSheet = ( {
|
||||
currentObservation,
|
||||
|
||||
@@ -10,7 +10,7 @@ import React from "react";
|
||||
type Props = {
|
||||
onPressClose: Function,
|
||||
discardChanges: Function
|
||||
}
|
||||
};
|
||||
|
||||
const DiscardChangesSheet = ( {
|
||||
onPressClose,
|
||||
|
||||
@@ -17,7 +17,7 @@ type Props = {
|
||||
discardObservation: Function,
|
||||
observations: Array<Object>,
|
||||
onSave?: Function
|
||||
}
|
||||
};
|
||||
|
||||
const DiscardObservationSheet = ( {
|
||||
onPressClose,
|
||||
|
||||
@@ -15,7 +15,7 @@ type Props = {
|
||||
onPressClose: ( ) => void,
|
||||
selectedValue?: Geoprivacy,
|
||||
updateGeoprivacyStatus: ( Geoprivacy ) => void
|
||||
}
|
||||
};
|
||||
|
||||
const GeoprivacySheet = ( {
|
||||
onPressClose,
|
||||
|
||||
@@ -8,7 +8,7 @@ import useTranslation from "sharedHooks/useTranslation";
|
||||
|
||||
type Props = {
|
||||
setShowImpreciseLocationSheet: Function
|
||||
}
|
||||
};
|
||||
|
||||
const ImpreciseLocationSheet = ( { setShowImpreciseLocationSheet }: Props ): Node => {
|
||||
const { t } = useTranslation( );
|
||||
|
||||
@@ -9,7 +9,7 @@ import useTranslation from "sharedHooks/useTranslation";
|
||||
|
||||
type Props = {
|
||||
setShowMissingEvidenceSheet: Function
|
||||
}
|
||||
};
|
||||
|
||||
const MissingEvidenceSheet = ( { setShowMissingEvidenceSheet }: Props ): Node => {
|
||||
const { t } = useTranslation( );
|
||||
|
||||
@@ -11,7 +11,7 @@ type Props = {
|
||||
onPressClose: Function,
|
||||
selectedValue: boolean,
|
||||
updateCaptiveStatus: Function
|
||||
}
|
||||
};
|
||||
|
||||
const WildStatusSheet = ( {
|
||||
onPressClose,
|
||||
|
||||
@@ -10,7 +10,7 @@ type Props = {
|
||||
selectedObservations: Array<Object>,
|
||||
selectObservationPhotos: Function,
|
||||
style?: Object
|
||||
}
|
||||
};
|
||||
|
||||
const GroupPhotoImage = ( {
|
||||
item,
|
||||
|
||||
@@ -31,7 +31,7 @@ type Props = {
|
||||
selectObservationPhotos: Function,
|
||||
separatePhotos: Function,
|
||||
totalPhotos: number
|
||||
}
|
||||
};
|
||||
|
||||
const GroupPhotos = ( {
|
||||
combinePhotos,
|
||||
|
||||
@@ -42,7 +42,7 @@ type Props = {
|
||||
joinProject: Function,
|
||||
leaveProject: Function,
|
||||
loadingProjectMembership: boolean
|
||||
}
|
||||
};
|
||||
|
||||
const ProjectDetails = ( {
|
||||
project, joinProject, leaveProject, loadingProjectMembership
|
||||
|
||||
@@ -19,7 +19,7 @@ type LocalesResponse = Array<{
|
||||
|
||||
type Props = {
|
||||
onChange: ( newLocale: string ) => void;
|
||||
}
|
||||
};
|
||||
|
||||
const LanguageSetting = ( { onChange }: Props ) => {
|
||||
const { t, i18n } = useTranslation();
|
||||
|
||||
@@ -26,7 +26,7 @@ type NameDisplayPref =
|
||||
|
||||
type Props = {
|
||||
onChange: ( options: TaxonNamesSettings ) => void;
|
||||
}
|
||||
};
|
||||
|
||||
const TaxonNamesSetting = ( { onChange }: Props ) => {
|
||||
const realm = useRealm( );
|
||||
|
||||
@@ -23,14 +23,14 @@ import colors from "styles/tailwindColors";
|
||||
type ConfettiProps = PropsWithChildren<{
|
||||
count: number
|
||||
duration?: number
|
||||
}>
|
||||
}>;
|
||||
|
||||
type AnimatedElementProps = PropsWithChildren<{
|
||||
index: number
|
||||
count: number
|
||||
animation: SharedValue<number>
|
||||
duration: number
|
||||
}>
|
||||
}>;
|
||||
|
||||
const AnimatedElement = memo(
|
||||
( {
|
||||
|
||||
@@ -12,7 +12,7 @@ type Props = {
|
||||
value: string | number;
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
|
||||
ValueComponent?: Function;
|
||||
}
|
||||
};
|
||||
|
||||
const LabelColonValue = ( {
|
||||
label,
|
||||
|
||||
@@ -13,13 +13,13 @@ type Props = {
|
||||
onObservationPressed: Function,
|
||||
onSpeciesPressed: Function,
|
||||
onMembersPressed: Function
|
||||
}
|
||||
};
|
||||
|
||||
type CountProps = {
|
||||
count: number,
|
||||
icon: string,
|
||||
label: string
|
||||
}
|
||||
};
|
||||
|
||||
type CountPressableProps = {
|
||||
accessibilityLabel: string,
|
||||
@@ -27,7 +27,7 @@ type CountPressableProps = {
|
||||
icon: string,
|
||||
label: string,
|
||||
onPress?: Function
|
||||
}
|
||||
};
|
||||
|
||||
const Count = ( {
|
||||
count, label, icon
|
||||
|
||||
@@ -9,7 +9,7 @@ import React from "react";
|
||||
type Props = {
|
||||
props: BottomSheetBackdropProps,
|
||||
onPress: ( ) => void
|
||||
}
|
||||
};
|
||||
|
||||
const BottomSheetStandardBackdrop = ( { props, onPress }: Props ) => (
|
||||
<BottomSheetBackdrop
|
||||
|
||||
@@ -30,7 +30,7 @@ type Props = {
|
||||
maxLength?: number,
|
||||
placeholder?: string,
|
||||
textInputStyle?: Object
|
||||
}
|
||||
};
|
||||
|
||||
const CharLimit = ( { current = 0, limit = 1, t } ) => {
|
||||
let currentColor = "text-darkGrayDisabled";
|
||||
|
||||
@@ -7,7 +7,7 @@ const PROGRESS_BAR_STYLE = { backgroundColor: "transparent" };
|
||||
|
||||
type Props = {
|
||||
progress: number
|
||||
}
|
||||
};
|
||||
|
||||
const UploadProgressBar = ( { progress }: Props ): Node => (
|
||||
<ProgressBar
|
||||
|
||||
@@ -10,7 +10,7 @@ type Props = {
|
||||
layout: "horizontal" | "vertical";
|
||||
fadeInIcon: ReactComponent;
|
||||
fadeOutIcon: ReactComponent;
|
||||
}
|
||||
};
|
||||
const AnimatedView = Reanimated.createAnimatedComponent( View );
|
||||
|
||||
const keyframe = new Keyframe( {
|
||||
|
||||
@@ -6,7 +6,7 @@ import React from "react";
|
||||
type Props = {
|
||||
iconClasses: Array<string>,
|
||||
completeColor: string
|
||||
}
|
||||
};
|
||||
|
||||
const UploadCompleteIcon = ( {
|
||||
iconClasses,
|
||||
|
||||
@@ -10,7 +10,7 @@ type Props = {
|
||||
progress: number;
|
||||
iconClasses: Array<string>;
|
||||
uniqueKey?: string;
|
||||
}
|
||||
};
|
||||
|
||||
const UploadProgressIcon = ( {
|
||||
color,
|
||||
|
||||
@@ -11,7 +11,7 @@ type FlattenUploadArgs = {
|
||||
name: string,
|
||||
type: string
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
const flattenUploadParams = async (
|
||||
uri: string
|
||||
|
||||
@@ -28,7 +28,7 @@ type Props = {
|
||||
licenseCode?: string
|
||||
}>,
|
||||
tablet: boolean
|
||||
}
|
||||
};
|
||||
|
||||
const TaxonMedia = ( {
|
||||
loading,
|
||||
|
||||
@@ -176,7 +176,7 @@ interface DefaultLocation {
|
||||
radius?: number
|
||||
}
|
||||
|
||||
type ExploreProviderProps = {children: React.ReactNode}
|
||||
type ExploreProviderProps = {children: React.ReactNode};
|
||||
type State = {
|
||||
casual: boolean,
|
||||
created_d1: string | null | undefined,
|
||||
@@ -225,7 +225,7 @@ type State = {
|
||||
excludeUser: object | undefined | null,
|
||||
verifiable: boolean,
|
||||
wildStatus: WILD_STATUS
|
||||
}
|
||||
};
|
||||
type Action = {type: EXPLORE_ACTION.RESET}
|
||||
| {type: EXPLORE_ACTION.DISCARD, snapshot: State}
|
||||
| {type: EXPLORE_ACTION.SET_USER, user: object | null, userId: number | null, storedState: State}
|
||||
@@ -284,8 +284,8 @@ type Action = {type: EXPLORE_ACTION.RESET}
|
||||
| {type: EXPLORE_ACTION.SET_REVIEWED, reviewedFilter: REVIEWED}
|
||||
| {type: EXPLORE_ACTION.SET_PHOTO_LICENSE, photoLicense: PHOTO_LICENSE}
|
||||
| {type: EXPLORE_ACTION.SET_MAP_BOUNDARIES, mapBoundaries: MapBoundaries}
|
||||
| {type: EXPLORE_ACTION.USE_STORED_STATE, storedState: State}
|
||||
type Dispatch = ( action: Action ) => void
|
||||
| {type: EXPLORE_ACTION.USE_STORED_STATE, storedState: State};
|
||||
type Dispatch = ( action: Action ) => void;
|
||||
|
||||
const ExploreContext = React.createContext<
|
||||
{
|
||||
|
||||
2
src/realmModels/types.d.ts
vendored
2
src/realmModels/types.d.ts
vendored
@@ -100,7 +100,7 @@ export type License =
|
||||
| "cc-by-sa"
|
||||
| "cc-by-nc-nd"
|
||||
| "cc-by-nc-sa"
|
||||
| "cc0"
|
||||
| "cc0";
|
||||
|
||||
export interface RealmObservationPojo {
|
||||
_created_at?: Date;
|
||||
|
||||
@@ -5,7 +5,7 @@ import { log } from "sharedHelpers/logger";
|
||||
|
||||
const logger = log.extend( "tracking.ts" );
|
||||
|
||||
type FirebaseParameters = Record<string, string | number | string[]>
|
||||
type FirebaseParameters = Record<string, string | number | string[]>;
|
||||
|
||||
export const logFirebaseEvent = (
|
||||
eventId: string,
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user