From b49f43771d2af3e7df297b05561ae2300375a69f Mon Sep 17 00:00:00 2001 From: ivan-aksamentov Date: Fri, 24 Feb 2023 01:31:23 +0100 Subject: [PATCH] refactor: lint --- web/src/components/Layout/NavigationBreadcrumb.tsx | 4 ++-- web/src/components/Regions/RegionsPlot.tsx | 2 +- web/src/components/Variants/VariantsPlot.tsx | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/web/src/components/Layout/NavigationBreadcrumb.tsx b/web/src/components/Layout/NavigationBreadcrumb.tsx index dbdf5ef6..bb7d1381 100644 --- a/web/src/components/Layout/NavigationBreadcrumb.tsx +++ b/web/src/components/Layout/NavigationBreadcrumb.tsx @@ -4,7 +4,7 @@ import { NavItem as NavItemBase, NavLink as NavLinkBase } from 'reactstrap' import Route from 'route-parser' import { head, isNil } from 'lodash-es' import { useRouter } from 'next/router' -import Select, { StylesConfig } from 'react-select' +import Select, { SingleValue, StylesConfig } from 'react-select' import urljoin from 'url-join' import { BsCaretRightFill as ArrowRight } from 'react-icons/bs' import { useTranslationSafe } from 'src/helpers/useTranslationSafe' @@ -165,7 +165,7 @@ export function BreadcrumbVariantSelector({ pathogenName, variant }: BreadcrumbV const options = useMemo(() => variants.map((variant) => ({ label: variant, value: variant })), [variants]) const option = useMemo(() => ({ label: value, value }), [value]) const onChange = useCallback( - (option: DropdownOption | null) => { + (option: SingleValue<{ label: string; value: string }>) => { if (option) { void push(urljoin('pathogen', pathogenName, 'variants', option.value)) // eslint-disable-line no-void setValue(option.value) diff --git a/web/src/components/Regions/RegionsPlot.tsx b/web/src/components/Regions/RegionsPlot.tsx index c1aba330..2c8f9678 100644 --- a/web/src/components/Regions/RegionsPlot.tsx +++ b/web/src/components/Regions/RegionsPlot.tsx @@ -84,7 +84,7 @@ function RegionsPlotImpl({ width, height, data, minDate, maxDate, pathogen, c .filter(Boolean) return { lines, ranges } - }, [shouldShowRanges, variants, variantsStyles]) + }, [shouldShowRanges, theme.plot.line.strokeWidth, variants, variantsStyles]) const metadata = useMemo(() => ({ pathogenName: pathogen.name, countryName }), [countryName, pathogen.name]) diff --git a/web/src/components/Variants/VariantsPlot.tsx b/web/src/components/Variants/VariantsPlot.tsx index 6304da65..0d611fcb 100644 --- a/web/src/components/Variants/VariantsPlot.tsx +++ b/web/src/components/Variants/VariantsPlot.tsx @@ -87,7 +87,7 @@ function LinePlot({ width, height, data, minDate, maxDate, pathogen, variantN .filter(Boolean) return { lines, ranges } - }, [regions, countries, geographyStyles, shouldShowRanges]) + }, [regions, countries, geographyStyles, theme.plot.line.strokeWidth, shouldShowRanges]) const metadata = useMemo(() => ({ pathogenName: pathogen.name, variantName }), [pathogen.name, variantName])