Skip to content

Commit

Permalink
Fix #2498 - black space appearing while loading taxon details (#2553)
Browse files Browse the repository at this point in the history
  • Loading branch information
budowski authored Dec 18, 2024
1 parent 185e2a2 commit 741ee90
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/components/TaxonDetails/TaxonDetails.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ import Taxonomy from "./Taxonomy";
import Wikipedia from "./Wikipedia";

const SCROLL_VIEW_STYLE = {
backgroundColor: colors.white
backgroundColor: colors.white,
flexGrow: 1
};

const logger = log.extend( "TaxonDetails" );
Expand Down Expand Up @@ -228,7 +229,7 @@ const TaxonDetails = ( ): Node => {

const displayTaxonDetails = ( ) => {
if ( isLoading ) {
return <View className="m-3 flex-1 h-full"><ActivityIndicator /></View>;
return <View className="m-3 flex-1 h-full justify-center"><ActivityIndicator /></View>;
}

if ( error?.message?.match( /Network request failed/ ) ) {
Expand Down Expand Up @@ -374,7 +375,7 @@ const TaxonDetails = ( ): Node => {
hideNavButtons={hideNavButtons}
taxonId={taxon?.id}
/>
<View className="flex-1 h-full bg-black -mt-[64px]">
<View className="flex flex-1 flex-grow bg-black -mt-[64px]">
<View className="w-full h-[420px] shrink-1">
{displayTaxonMedia()}
<View
Expand Down

0 comments on commit 741ee90

Please sign in to comment.