From 76be5f08d14fdbcf82c152579da87acff8296cd9 Mon Sep 17 00:00:00 2001 From: Merritt Baggett Date: Mon, 3 Feb 2025 09:43:39 -0500 Subject: [PATCH 1/2] passed onClick prop to FooterButton / added color --- components/TestimonyCard/TestimonyItem.tsx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/components/TestimonyCard/TestimonyItem.tsx b/components/TestimonyCard/TestimonyItem.tsx index 5d072d235..ffebce14e 100644 --- a/components/TestimonyCard/TestimonyItem.tsx +++ b/components/TestimonyCard/TestimonyItem.tsx @@ -21,17 +21,20 @@ import { UserInfoHeader } from "./UserInfoHeader" type FooterButtonProps = Omit & { className?: string children?: ReactNode + onClick?: any // Cannot find name 'MouseEventHandler' } const FooterButton = ({ variant = "text", className, - children + children, + onClick }: FooterButtonProps) => { return ( @@ -135,6 +138,7 @@ export const TestimonyItem = ({ {canExpand && ( setShowAllTestimony(true)} > @@ -168,7 +172,11 @@ export const TestimonyItem = ({ )} - setIsReporting(true)}> + setIsReporting(true)} + > {t("reportModal.report")} From 4b69248d23a029296d38bf34bba9da5678567608 Mon Sep 17 00:00:00 2001 From: Merritt Baggett Date: Tue, 4 Feb 2025 18:01:50 -0500 Subject: [PATCH 2/2] fixed data type --- components/TestimonyCard/TestimonyItem.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/TestimonyCard/TestimonyItem.tsx b/components/TestimonyCard/TestimonyItem.tsx index ffebce14e..c619bb03b 100644 --- a/components/TestimonyCard/TestimonyItem.tsx +++ b/components/TestimonyCard/TestimonyItem.tsx @@ -1,5 +1,5 @@ import { useTranslation } from "next-i18next" -import { ReactNode, useState } from "react" +import { MouseEventHandler, ReactNode, useState } from "react" import { ButtonProps } from "react-admin" import { ToastContainer } from "react-bootstrap" import Image from "react-bootstrap/Image" @@ -21,7 +21,7 @@ import { UserInfoHeader } from "./UserInfoHeader" type FooterButtonProps = Omit & { className?: string children?: ReactNode - onClick?: any // Cannot find name 'MouseEventHandler' + onClick?: MouseEventHandler | undefined } const FooterButton = ({