diff --git a/src/components/AddObsModal.js b/src/components/AddObsModal.js index 19db33923..47771b31f 100644 --- a/src/components/AddObsModal.js +++ b/src/components/AddObsModal.js @@ -6,11 +6,12 @@ import { } from "components/SharedComponents"; import { View } from "components/styledComponents"; import * as React from "react"; +import { useState } from "react"; import { Platform, StatusBar } from "react-native"; import { useTheme } from "react-native-paper"; import Observation from "realmModels/Observation"; import { useTranslation } from "sharedHooks"; -import useStore from "stores/useStore"; +import useStore, { storage } from "stores/useStore"; import colors from "styles/tailwindColors"; type Props = { @@ -21,6 +22,7 @@ type Props = { const AddObsModal = ( { closeModal, navAndCloseModal }: Props ): React.Node => { const { t } = useTranslation( ); const theme = useTheme( ); + const [hideHelpText, setHideHelpText] = useState( storage.getBoolean( "hideAddObsHelpText" ) ); const majorVersionIOS = parseInt( Platform.Version, 10 ); @@ -45,43 +47,50 @@ const AddObsModal = ( { closeModal, navAndCloseModal }: Props ): React.Node => { const greenCircleClass = "bg-inatGreen rounded-full h-[46px] w-[46px]"; + const hideHelpTextForever = async ( ) => { + setHideHelpText( true ); + storage.set( "hideAddObsHelpText", true ); + }; + return ( <> - - - - - {t( "Identify-an-organism" )} - + { !hideHelpText && ( + + + + + {t( "Identify-an-organism" )} + - - closeModal( )} - accessibilityLabel={t( "Close" )} - accessibilityHint={t( "Closes-new-observation-options" )} - /> + + + + {bulletedText.map( ( { text, icon } ) => ( + + + {text} + + ) )} - {bulletedText.map( ( { text, icon } ) => ( - - - {text} - - ) )} - + )}