Files
iNaturalistReactNative/src/components/Observations/LoggedOutCard.js
Chris 11d05b5b01 Intro work to obs list toolbar redesign (#411)
* Intro work to obs list toolbar redesign

* Replace current upload prompt w/ toolbar

* Fix and skip locale tests

* Add resetting error to cleanup func

* Update icon size

* Make loading bar more accurate

* lint

* Fix file name

* Make requested changes

* Space parens

* Update UserCard.js

* Fix UserCard background color

* Fix navigation to Explore screen

* Small changes, mostly to get LoggedOutCard visible and tests passing

---------

Co-authored-by: Amanda Bullington <35536439+albullington@users.noreply.github.com>
Co-authored-by: Amanda Bullington <albullington@gmail.com>
2023-02-01 13:00:04 -08:00

36 lines
1.1 KiB
JavaScript

// @flow
import { useNavigation } from "@react-navigation/native";
import { Pressable, Text } from "components/styledComponents";
import type { Node } from "react";
import React from "react";
import { useTranslation } from "react-i18next";
import useNumUnuploadedObservations from "sharedHooks/useNumUnuploadedObservations";
const LoggedOutCard = ( ): Node => {
const navigation = useNavigation( );
const numUnuploadedObs = useNumUnuploadedObservations( );
const { t } = useTranslation( );
return (
<Pressable
onPress={( ) => navigation.navigate( "login" )}
accessibilityRole="link"
accessibilityLabel={t( "Navigate-to-login-screen" )}
className="rounded-bl-3xl rounded-br-3xl h-24 justify-center"
>
<Text
testID="log-in-to-iNaturalist-text"
className="self-center text-2xl"
>
{t( "Log-in-to-iNaturalist" )}
</Text>
<Text className="self-center text-base">
{t( "X-unuploaded-observations", { observationCount: numUnuploadedObs } )}
</Text>
</Pressable>
);
};
export default LoggedOutCard;