From fdd948cf37232a4c653d52cf7a3fc879a7b0e4fd Mon Sep 17 00:00:00 2001 From: jnsturgis Date: Thu, 20 Jan 2022 20:17:28 +0100 Subject: [PATCH] Add unique keys to avoid warning --- src/components/histogram/histogram.tsx | 5 +++-- src/components/statline/statline.tsx | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/components/histogram/histogram.tsx b/src/components/histogram/histogram.tsx index 4e93383..edab521 100644 --- a/src/components/histogram/histogram.tsx +++ b/src/components/histogram/histogram.tsx @@ -1,4 +1,4 @@ -import {Progress} from './progress' + import {Progress} from './progress' type Props = { data: number[] @@ -10,7 +10,8 @@ export const Histogram = ({ data }: Props) => { return(
{ data.map(( value, i ) => ( - + )) }
diff --git a/src/components/statline/statline.tsx b/src/components/statline/statline.tsx index b4a1777..a3b3240 100644 --- a/src/components/statline/statline.tsx +++ b/src/components/statline/statline.tsx @@ -8,11 +8,11 @@ type Props = { export const StatLine = ({labels, values}: Props) => { return (
- {values.map((value,i ) => ( -
+ {values.map((value,i ) => ( +
{value}
{labels[i]}
-
+
))}
)