From 0aa9a315c3acfb020833f4554c6373e61ebbc58a Mon Sep 17 00:00:00 2001 From: Divya Bhatt Date: Wed, 8 May 2024 10:13:54 +0100 Subject: [PATCH] tidy up and make type as optional to fix error - typeof Card is not assignable to parameter of type --- .../src/components/FrontsEdit/CollectionComponents/Card.tsx | 2 +- fronts-client/src/components/card/chef/ChefCard.tsx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fronts-client/src/components/FrontsEdit/CollectionComponents/Card.tsx b/fronts-client/src/components/FrontsEdit/CollectionComponents/Card.tsx index 1efd4673939..318d7b73598 100644 --- a/fronts-client/src/components/FrontsEdit/CollectionComponents/Card.tsx +++ b/fronts-client/src/components/FrontsEdit/CollectionComponents/Card.tsx @@ -112,7 +112,7 @@ class Card extends React.Component { }; public toggleShowArticleSublinks = (e?: React.MouseEvent) => { - const togPos = this.state.showCardSublinks ? false : true; + const togPos = !this.state.showCardSublinks; this.setState({ showCardSublinks: togPos }); if (e) { e.stopPropagation(); diff --git a/fronts-client/src/components/card/chef/ChefCard.tsx b/fronts-client/src/components/card/chef/ChefCard.tsx index 27ac1301a98..e4bbacbc21c 100644 --- a/fronts-client/src/components/card/chef/ChefCard.tsx +++ b/fronts-client/src/components/card/chef/ChefCard.tsx @@ -59,7 +59,7 @@ export const ChefCard = ({ {showMeta && ( Chef - {upperFirst(chef?.sectionName)} + {upperFirst(chef?.type)} )} @@ -72,7 +72,7 @@ export const ChefCard = ({ /> - {`${chef?.firstName} ${chef?.lastName}` ?? 'No Chef found'} + {chef?.webTitle ?? 'No Chef found'}