File tree Expand file tree Collapse file tree 3 files changed +4
-2
lines changed
Expand file tree Collapse file tree 3 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -71,6 +71,7 @@ const CustomTooltipContent: FC<CustomTooltipContentProps> = (props) => {
7171 return {
7272 ...entry ,
7373 value : `: ${ Math . round ( entry . value * 10 ) / 10 } %` ,
74+ graphicalItemId : entry . key ,
7475 }
7576 } )
7677 return < ChartTooltipContent { ...props } payload = { newPayload } className = "bg-black" />
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import { useTranslation } from 'react-i18next'
22import { Alert , AlertDescription , AlertTitle } from './ui/alert'
33
44interface Props {
5- error ?: Error
5+ error ?: unknown
66}
77
88export default function ErrorAlert ( { error } : Props ) {
@@ -22,7 +22,7 @@ export default function ErrorAlert({ error }: Props) {
2222 { error !== undefined && (
2323 < p >
2424 Please include the following error message:
25- < span className = "block font-mono border-1 border-neutral-700 p-1 rounded mt-1" > { error . message } </ span >
25+ < span className = "block font-mono border-1 border-neutral-700 p-1 rounded mt-1" > { error instanceof Error ? error . message : String ( error ) } </ span >
2626 </ p >
2727 ) }
2828 </ AlertDescription >
Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ const CustomTooltipContent = (props: CustomTooltipContentProps) => {
4040 const newPayload = payload . map ( ( entry ) => ( {
4141 ...entry ,
4242 value : `${ entry . value * 100 } %` ,
43+ graphicalItemId : entry . key ,
4344 } ) )
4445 return < ChartTooltipContent { ...props } payload = { newPayload } />
4546 }
You can’t perform that action at this time.
0 commit comments