From 71d637df664e91cfe02484b530be7afb150ff431 Mon Sep 17 00:00:00 2001 From: Ben White Date: Wed, 22 Nov 2023 14:57:59 +0100 Subject: [PATCH] Fixes --- .../src/scenes/insights/views/BoldNumber/Textfit.stories.tsx | 2 +- frontend/src/scenes/insights/views/BoldNumber/Textfit.tsx | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/frontend/src/scenes/insights/views/BoldNumber/Textfit.stories.tsx b/frontend/src/scenes/insights/views/BoldNumber/Textfit.stories.tsx index 966e6bc230b17..69d3a534095dd 100644 --- a/frontend/src/scenes/insights/views/BoldNumber/Textfit.stories.tsx +++ b/frontend/src/scenes/insights/views/BoldNumber/Textfit.stories.tsx @@ -1,6 +1,6 @@ import { Meta, StoryFn, StoryObj } from '@storybook/react' -import { Textfit } from './Textfit2' +import { Textfit } from './Textfit' type Story = StoryObj const meta: Meta = { diff --git a/frontend/src/scenes/insights/views/BoldNumber/Textfit.tsx b/frontend/src/scenes/insights/views/BoldNumber/Textfit.tsx index 249924e0ead52..b76f20f920ea3 100644 --- a/frontend/src/scenes/insights/views/BoldNumber/Textfit.tsx +++ b/frontend/src/scenes/insights/views/BoldNumber/Textfit.tsx @@ -1,7 +1,7 @@ import { useRef } from 'react' import useResizeObserver from 'use-resize-observer' -export type TextfitProps = React.HTMLAttributes & { +export type TextfitProps = { min: number max: number children: string @@ -10,7 +10,6 @@ export type TextfitProps = React.HTMLAttributes & { export const Textfit = ({ min, max, children }: TextfitProps): JSX.Element => { const parentRef = useRef(null) const childRef = useRef(null) - const fontSizeRef = useRef(min) let resizeTimer: NodeJS.Timeout