Skip to content

Commit

Permalink
tidy up and make type as optional to fix error - typeof Card is not a…
Browse files Browse the repository at this point in the history
…ssignable to parameter of type
  • Loading branch information
Divs-B committed May 8, 2024
1 parent bfeb558 commit 0aa9a31
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ class Card extends React.Component<CardContainerProps> {
};

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();
Expand Down
4 changes: 2 additions & 2 deletions fronts-client/src/components/card/chef/ChefCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export const ChefCard = ({
{showMeta && (
<CardMetaContainer size={size}>
<CardMetaHeading>Chef</CardMetaHeading>
<CardMetaContent>{upperFirst(chef?.sectionName)}</CardMetaContent>
<CardMetaContent>{upperFirst(chef?.type)}</CardMetaContent>
</CardMetaContainer>
)}
<CardContent textSize={textSize}>
Expand All @@ -72,7 +72,7 @@ export const ChefCard = ({
/>
<CardHeadingContainer size={size}>
<CardHeading data-testid="headline" html>
{`${chef?.firstName} ${chef?.lastName}` ?? 'No Chef found'}
{chef?.webTitle ?? 'No Chef found'}
</CardHeading>
</CardHeadingContainer>
</CardContent>
Expand Down

0 comments on commit 0aa9a31

Please sign in to comment.