From 6ef202cef9ddfbc8ef23236bb99a01a1cc274617 Mon Sep 17 00:00:00 2001 From: Jonathon Herbert Date: Wed, 1 May 2024 16:05:11 +0100 Subject: [PATCH] Ensure recipe meta is not displayed in clipboard --- .../src/components/FrontsEdit/CollectionComponents/Card.tsx | 3 ++- fronts-client/src/components/card/article/ArticleCard.tsx | 2 +- fronts-client/src/components/card/recipe/RecipeCard.tsx | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/fronts-client/src/components/FrontsEdit/CollectionComponents/Card.tsx b/fronts-client/src/components/FrontsEdit/CollectionComponents/Card.tsx index 85401bf4463..a460e2b6d4c 100644 --- a/fronts-client/src/components/FrontsEdit/CollectionComponents/Card.tsx +++ b/fronts-client/src/components/FrontsEdit/CollectionComponents/Card.tsx @@ -96,7 +96,7 @@ type CardContainerProps = ContainerProps & { addImageToCard: (id: string, response: ValidationResponse) => void; updateCardMeta: (id: string, meta: CardMeta) => void; clearCardSelection: (id: string) => void; - type: CardTypes; + type?: CardTypes; isSelected: boolean; numSupportingArticles: number; editMode: EditMode; @@ -218,6 +218,7 @@ class Card extends React.Component { onClick={isUneditable ? undefined : () => onSelect(uuid)} size={size} textSize={textSize} + showMeta={showMeta} /> {getSublinks} diff --git a/fronts-client/src/components/card/article/ArticleCard.tsx b/fronts-client/src/components/card/article/ArticleCard.tsx index 613d0f16b2d..2e8a90d44cb 100644 --- a/fronts-client/src/components/card/article/ArticleCard.tsx +++ b/fronts-client/src/components/card/article/ArticleCard.tsx @@ -195,6 +195,6 @@ const createMapStateToProps = () => { }; }; -export { ArticleComponentProps, ArticleCard as ArticleComponent }; +export { ArticleComponentProps, ArticleCard }; export default connect(createMapStateToProps)(ArticleCard); diff --git a/fronts-client/src/components/card/recipe/RecipeCard.tsx b/fronts-client/src/components/card/recipe/RecipeCard.tsx index 48f1b0d416e..70bef5e7dbc 100644 --- a/fronts-client/src/components/card/recipe/RecipeCard.tsx +++ b/fronts-client/src/components/card/recipe/RecipeCard.tsx @@ -46,7 +46,7 @@ export const RecipeCard = ({ isUneditable, collectionId, frontId, - showMeta, + showMeta = true, ...rest }: Props) => { const card = useSelector((state) => selectCard(state, id));