Skip to content

Commit

Permalink
Show avatar on blank profiles (#207)
Browse files Browse the repository at this point in the history
  • Loading branch information
duogenesis authored Mar 1, 2024
1 parent 465a7f6 commit 0f1a295
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions components/prospect-profile-screen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ const EnlargeableImage = ({
style,
isPrimary,
}: {
imageUuid: string | undefined,
imageUuid: string | undefined | null,
onChangeEmbiggened: (uuid: string) => void,
style?: any,
isPrimary: boolean,
Expand Down Expand Up @@ -500,7 +500,15 @@ const Content = (navigationRef) => ({navigation, route, ...props}) => {
undefined :
data.photo_uuids;

const imageUuid0 = imageUuids && imageUuids[0];
const imageUuid0 = (() => {
if (imageUuids === undefined) {
return undefined;
}
if (imageUuids.length === 0) {
return null;
}
return imageUuids[0];
})();

const numMorePics = Math.max(0, (imageUuids ?? []).length - 1);

Expand Down

0 comments on commit 0f1a295

Please sign in to comment.