- Fixed issue with undefined value for the grocery requested by section

This commit is contained in:
Dejan
2024-10-27 17:38:09 +01:00
parent 6a9d446c11
commit 3187844b50
2 changed files with 2 additions and 2 deletions

View File

@ -183,7 +183,7 @@ const GroceryItem = ({
fontWeight: "bold",
}}
>
{getInitials(itemCreator.firstName, itemCreator.lastName ?? "")}
{itemCreator ? getInitials(itemCreator.firstName, itemCreator.lastName) : ""}
</Text>
</View>
</View>}

View File

@ -1,6 +1,6 @@
import { FlatList, StyleSheet } from "react-native";
import React, { useEffect, useState } from "react";
import { Button, Text, TouchableOpacity, View } from "react-native-ui-lib";
import { Text, TouchableOpacity, View } from "react-native-ui-lib";
import GroceryItem from "./GroceryItem";
import {
GroceryCategory,