mirror of
https://github.com/inaturalist/iNaturalistReactNative.git
synced 2026-06-19 13:11:23 -04:00
* Removes location picker from match screen, fetches user location and reloads suggestions instead * fix variable name * Remove unused prop * changes requested, changes to fetching place guess, changes to refetch offline * Close permission gate when permissions denied initially * change toggle to set in reducer * add optional chaining to location values * Add optional chaining for place name * Closing on initial block optional The function of closing the permission gate on pressing the initial block button was as far as I can see only scoped to the Match container. --------- Co-authored-by: Johannes Klein <johannes.t.klein@gmail.com>
39 lines
1.1 KiB
JavaScript
39 lines
1.1 KiB
JavaScript
import {
|
|
INatIcon,
|
|
Subheading2
|
|
} from "components/SharedComponents";
|
|
import { ImageBackground, Pressable } from "components/styledComponents";
|
|
import React from "react";
|
|
import { useTranslation } from "sharedHooks";
|
|
import colors from "styles/tailwindColors";
|
|
|
|
type Props = {
|
|
handleAddLocationPressed: ( ) => void
|
|
}
|
|
|
|
const EmptyMapSection = ( {
|
|
handleAddLocationPressed
|
|
}: Props ) => {
|
|
const { t } = useTranslation( );
|
|
return (
|
|
<Pressable
|
|
accessibilityLabel={t( "Edit-location" )}
|
|
accessibilityRole="link"
|
|
onPress={handleAddLocationPressed}
|
|
>
|
|
<ImageBackground
|
|
className="w-full h-[230px] flex items-center justify-center"
|
|
source={require( "images/topographic-map.png" )}
|
|
accessibilityIgnoresInvertColors
|
|
>
|
|
<INatIcon name="location" size={40} color={colors.white} />
|
|
<Subheading2 className="mt-3 text-white px-28 text-center">
|
|
{t( "Add-location-for-better-identifications" )}
|
|
</Subheading2>
|
|
</ImageBackground>
|
|
</Pressable>
|
|
);
|
|
};
|
|
|
|
export default EmptyMapSection;
|