I'm working on trying to only render a header when a collections
is present and to not render it when it is empty. A simple fix but I've been receiving this Unexpected Token syntax error and I can't seem to find the issue. Any help would be greatly appreciated as this is my first time posting and using react-native!
const collectionsHeaderHandler = ({ favorites }) =>
{favorites.meta.collections} ?
{copyDek.FavoritesLayout.collectionsHeader} :
"";
const FavoritesLayoutCollections = ({ favorites, onPressHandlers }) => (
<FavoritesLayoutCollectionsWrapper>
<FavoritesLayoutCollectionsHeader>
{collectionsHeaderHandler}
</FavoritesLayoutCollectionsHeader>
<FavoritesCollections
collections={favorites.meta.collections}
onPressCollection={onPressHandlers.onPressCollection}
/>
</FavoritesLayoutCollectionsWrapper>
);