mirror of
https://github.com/inaturalist/iNaturalistReactNative.git
synced 2026-05-06 06:35:57 -04:00
* refactor: convert UserIcon to TypeScript * feat: show simple MyObs to signed in user; add user icon & login to header * feat: show warning and edit button for unuploaded obs w/o basics * refactor: consolidate ObsEdit navigation logic * feat: show edit button with circle dots * refactor: upload UploadQueuedRotatingIcon to the more reusable CircleDots component * refactor: upload icons to use more composition and fewer specialized, one-off components * fix: bugs in determining if an obs has date and coords * refactor: extract MyObservationsSimple business logic into container * refactor: get total obs count from relevant hooks * feat: show remote species for signed in users * fix: hide photo count icon when missing basics icon is present * feat: show banner alerting user when missing location or date Closes MOB-318
45 lines
1.0 KiB
JavaScript
45 lines
1.0 KiB
JavaScript
// @flow
|
|
|
|
import classnames from "classnames";
|
|
import { Body1 } from "components/SharedComponents";
|
|
import { SafeAreaView } from "components/styledComponents";
|
|
import * as React from "react";
|
|
import { StatusBar } from "react-native";
|
|
|
|
type Props = {
|
|
children: React.Node,
|
|
isDebug?: boolean,
|
|
testID?: string,
|
|
// If someone can explain to me why className doesn't work here, I'm all
|
|
// ears ~~~kueda 20230815
|
|
wrapperClassName?: string
|
|
};
|
|
|
|
const ViewWrapper = ( {
|
|
children,
|
|
isDebug,
|
|
wrapperClassName,
|
|
testID
|
|
}: Props ): React.Node => (
|
|
<SafeAreaView
|
|
className={classnames(
|
|
"flex-1",
|
|
"bg-white",
|
|
wrapperClassName,
|
|
isDebug
|
|
? "border-2 border-deepPink"
|
|
: null
|
|
)}
|
|
testID={testID}
|
|
>
|
|
{isDebug && (
|
|
// eslint-disable-next-line i18next/no-literal-string
|
|
<Body1 className="bg-deepPink text-white absolute bottom-0 right-0 z-10">DEBUG</Body1>
|
|
)}
|
|
<StatusBar barStyle="dark-content" backgroundColor="white" />
|
|
{children}
|
|
</SafeAreaView>
|
|
);
|
|
|
|
export default ViewWrapper;
|