diff --git a/components/Flag.js b/components/Flag.js index 94702460..26a435c4 100644 --- a/components/Flag.js +++ b/components/Flag.js @@ -2,7 +2,7 @@ import PropTypes from 'prop-types' import React from 'react' import styled from 'styled-components' -var supportedCountryCodes = [ +const supportedCountryCodes = [ 'ad', 'ae', 'af', diff --git a/components/Header.js b/components/Header.js index 945efe55..66269d5b 100644 --- a/components/Header.js +++ b/components/Header.js @@ -7,7 +7,7 @@ const Header = () => { const { asPath, locale, defaultLocale } = useRouter() const lang = locale === defaultLocale ? '' : `/${locale}` - const canonical = 'https://explorer.ooni.org' + lang + asPath.split('?')[0] + const canonical = `https://explorer.ooni.org${lang}${asPath.split('?')[0]}` const intl = useIntl() const description = intl.formatMessage({ id: 'Home.Meta.Description' }) diff --git a/components/MATChart.js b/components/MATChart.js index d7941db8..6dd82cfc 100644 --- a/components/MATChart.js +++ b/components/MATChart.js @@ -101,10 +101,10 @@ const MATChart = ({ query, showFilters = true }) => { <> {data?.data?.result?.length > 0 ? ( - {data && data.data.dimension_count == 0 && ( + {data && data.data.dimension_count === 0 && ( )} - {data && data.data.dimension_count == 1 && ( + {data && data.data.dimension_count === 1 && ( )} {data && data.data.dimension_count > 1 && ( diff --git a/components/NavBar.js b/components/NavBar.js index 981cd057..8e47a5e9 100644 --- a/components/NavBar.js +++ b/components/NavBar.js @@ -144,6 +144,7 @@ export const NavBar = ({ color }) => { logout() } + // biome-ignore lint/correctness/useExhaustiveDependencies: useEffect(() => { setShowMenu(false) }, [pathname]) diff --git a/components/ThirdPartyDataChart.js b/components/ThirdPartyDataChart.js index 1db36431..95c1f58e 100644 --- a/components/ThirdPartyDataChart.js +++ b/components/ThirdPartyDataChart.js @@ -58,6 +58,7 @@ const ThirdPartyDataChart = ({ since, until, country, asn, ...props }) => { return [from, to] }, [since, until]) + // biome-ignore lint/correctness/useExhaustiveDependencies: const cloudflareData = useEffect(() => { if (!since && !until) return diff --git a/components/aggregation/Debug.js b/components/aggregation/Debug.js index 7e97f9e0..7c33c18c 100644 --- a/components/aggregation/Debug.js +++ b/components/aggregation/Debug.js @@ -113,7 +113,10 @@ export const Debug = ({ query, children, ...rest }) => { - diff --git a/components/aggregation/DebugContext.js b/components/aggregation/DebugContext.js index fdda6bb3..e94c63aa 100644 --- a/components/aggregation/DebugContext.js +++ b/components/aggregation/DebugContext.js @@ -1,10 +1,10 @@ import React, { - useState, createContext, - useContext, useCallback, + useContext, useEffect, useRef, + useState, } from 'react' export const DebugContext = createContext() @@ -58,6 +58,7 @@ export const DebugProvider = ({ children }) => { scrollStartRef.current = timestamp }, []) + // biome-ignore lint/correctness/useExhaustiveDependencies: useEffect(() => { // when API query is initiated, reset timestamps console.debug('Query changed. Resetting timers') diff --git a/components/aggregation/mat/ChartHeader.js b/components/aggregation/mat/ChartHeader.js index c91c8814..cc47143d 100644 --- a/components/aggregation/mat/ChartHeader.js +++ b/components/aggregation/mat/ChartHeader.js @@ -2,10 +2,10 @@ import { Box, Flex, Heading, Text } from 'ooni-components' import OONILogo from 'ooni-components/svgs/logos/OONI-HorizontalMonochrome.svg' import { useIntl } from 'react-intl' -import { testGroups, testNames } from '/components/test-info' import CountryNameLabel from './CountryNameLabel' import { useMATContext } from './MATContext' import { colorMap } from './colorMap' +import { testGroups, testNames } from '/components/test-info' const Legend = ({ label, color }) => { return ( @@ -29,9 +29,9 @@ const getTestNameGroupName = (testNameArray) => { return [testNames[testNameArray[0]]?.id || testNameArray[0]] const testGroup = new Set() - testNameArray.forEach((t) => { + for (const t of testNameArray) { testNames[t]?.group && testGroup.add(testNames[t]?.group) - }) + } // if all test names belong to a single group, show group name if (testGroup.size === 1) { const testGroupName = testGroups[[...testGroup][0]].id @@ -50,9 +50,9 @@ export const SubtitleStr = ({ query }) => { ? query.test_name : [query.test_name] const testNames = getTestNameGroupName(testNameQuery) - testNames.forEach((testName) => { + for (const testName of testNames) { params.add(intl.formatMessage({ id: testName, defaultMessage: '' })) - }) + } } if (query.domain) { params.add(query.domain.split(',').join(', ')) @@ -104,25 +104,25 @@ export const ChartHeader = ({ options = {} }) => { )} diff --git a/components/aggregation/mat/CustomTooltip.js b/components/aggregation/mat/CustomTooltip.js index 10fdc886..21d17a19 100644 --- a/components/aggregation/mat/CustomTooltip.js +++ b/components/aggregation/mat/CustomTooltip.js @@ -60,7 +60,7 @@ export const generateSearchQuery = (data, query) => { if (query.time_grain !== 'hour') { untilFilter = untilFilter.split('T')[0] } else { - untilFilter = untilFilter.split('.')[0] + 'Z' + untilFilter = `${untilFilter.split('.')[0]}Z` } } diff --git a/components/aggregation/mat/Filters.js b/components/aggregation/mat/Filters.js index 24fbe182..9320dd77 100644 --- a/components/aggregation/mat/Filters.js +++ b/components/aggregation/mat/Filters.js @@ -354,7 +354,7 @@ const Filters = ({ data = [], tableData, setDataForCharts, query }) => { ]) useEffect(() => { - if (state.globalFilter == undefined && resetTableRef.current === true) { + if (state.globalFilter === undefined && resetTableRef.current === true) { resetTableRef.current = false toggleAllRowsSelected(false) } @@ -387,10 +387,12 @@ const Filters = ({ data = [], tableData, setDataForCharts, query }) => { {headerGroups.map((headerGroup, i) => ( + // biome-ignore lint/suspicious/noArrayIndexKey: {headerGroup.headers.map((column, i) => { return ( key={i} {...column.getHeaderProps([ { @@ -457,6 +459,7 @@ const Filters = ({ data = [], tableData, setDataForCharts, query }) => { {row.cells.map((cell, i) => { return ( key={i} {...cell.getCellProps([ { diff --git a/components/aggregation/mat/Form.js b/components/aggregation/mat/Form.js index bf7f94c2..0b71a054 100644 --- a/components/aggregation/mat/Form.js +++ b/components/aggregation/mat/Form.js @@ -95,6 +95,7 @@ const filterAxisOptions = ( .map(([option]) => option) } +// biome-ignore lint/style/useDefaultParameterLast: function isValidFilterForTestname(testName = 'XX', arrayWithMapping) { // whether the dependent filter is valid to show along with `testName` return arrayWithMapping.includes(testName) @@ -138,17 +139,17 @@ export const Form = ({ onSubmit, query }) => { } }, [defaultValues, reset, router.isReady]) - const [since, setSince] = useState(defaultValues['since']) - const [until, setUntil] = useState(defaultValues['until']) - const [countryValue, setCountryValue] = useState(defaultValues['probe_cc']) - const [testNameValue, setTestNameValue] = useState(defaultValues['test_name']) + const [since, setSince] = useState(defaultValues.since) + const [until, setUntil] = useState(defaultValues.until) + const [countryValue, setCountryValue] = useState(defaultValues.probe_cc) + const [testNameValue, setTestNameValue] = useState(defaultValues.test_name) useEffect(() => { const subscription = watch((value, { name, type }) => { - if (name === 'since') setSince(value['since']) - if (name === 'until') setUntil(value['until']) - if (name === 'probe_cc') setCountryValue(value['probe_cc']) - if (name === 'test_name') setTestNameValue(value['test_name']) + if (name === 'since') setSince(value.since) + if (name === 'until') setUntil(value.until) + if (name === 'probe_cc') setCountryValue(value.probe_cc) + if (name === 'test_name') setTestNameValue(value.test_name) }) return () => subscription.unsubscribe() }, [watch]) @@ -258,12 +259,14 @@ export const Form = ({ onSubmit, query }) => { if (!availableValues.includes(getValues('time_grain'))) setValue('time_grain', 'hour') return availableValues - } else if (diff >= 8 && diff < 31) { + } + if (diff >= 8 && diff < 31) { const availableValues = ['day', 'week'] if (!availableValues.includes(getValues('time_grain'))) setValue('time_grain', 'day') return availableValues - } else if (diff >= 31) { + } + if (diff >= 31) { const availableValues = ['day', 'week', 'month'] if (!availableValues.includes(getValues('time_grain'))) setValue('time_grain', 'day') @@ -296,6 +299,7 @@ export const Form = ({ onSubmit, query }) => { {intl.formatMessage({ id: 'MAT.Form.AllCountries' })} {sortedCountries.map((c, idx) => ( + // biome-ignore lint/suspicious/noArrayIndexKey: @@ -372,6 +376,7 @@ export const Form = ({ onSubmit, query }) => { width={1} > {timeGrainOptions.map((option, idx) => ( + // biome-ignore lint/suspicious/noArrayIndexKey: @@ -391,6 +396,7 @@ export const Form = ({ onSubmit, query }) => { width={1} > {xAxisOptionsFiltered.map((option, idx) => ( + // biome-ignore lint/suspicious/noArrayIndexKey:
- {headerGroups.map((headerGroup) => ( - - {headerGroup.headers.map((column) => ( - + {headerGroup.headers.map((column, i) => ( + - {rows.map((row) => { + {rows.map((row, ri) => { prepareRow(row) return ( - - {row.cells.map((cell) => { - return + // biome-ignore lint/suspicious/noArrayIndexKey: + + {row.cells.map((cell, ci) => { + return ( + // biome-ignore lint/suspicious/noArrayIndexKey: + + ) })} ) @@ -147,7 +158,9 @@ const ConnectionStatusCell = ({ cell: { value } }) => { const TorDetails = ({ isAnomaly, isFailure, measurement, render }) => { // https://github.com/ooni/spec/blob/master/nettests/ts-023-tor.md#possible-conclusions - let status, hint, summaryText + let status + let hint + let summaryText if (isFailure) { status = 'error' diff --git a/components/measurement/nettests/TorSnowflake.js b/components/measurement/nettests/TorSnowflake.js index 302cb52c..4a63c9ac 100644 --- a/components/measurement/nettests/TorSnowflake.js +++ b/components/measurement/nettests/TorSnowflake.js @@ -26,7 +26,10 @@ const TorSnowflakeDetails = ({ isAnomaly, isFailure, measurement, render }) => { test_keys: { bootstrap_time, failure }, } = measurement - let status, hint, summaryText, metaText + let status + let hint + let summaryText + let metaText if (isFailure) { status = 'error' diff --git a/components/measurement/nettests/WebConnectivity.js b/components/measurement/nettests/WebConnectivity.js index 057d1aa3..f6ac3ac4 100644 --- a/components/measurement/nettests/WebConnectivity.js +++ b/components/measurement/nettests/WebConnectivity.js @@ -1,9 +1,10 @@ import bufferFrom from 'buffer-from' import NLink from 'next/link' -import url from 'node:url' import { Box, Flex, Heading, Text } from 'ooni-components' import PropTypes from 'prop-types' import React from 'react' +// biome-ignore lint/style/useNodejsImportProtocol: +import url from 'url' import deepmerge from 'deepmerge' import { Cross, Tick } from 'ooni-components/icons' diff --git a/components/measurement/nettests/WhatsApp.js b/components/measurement/nettests/WhatsApp.js index b53a58f9..eea81863 100644 --- a/components/measurement/nettests/WhatsApp.js +++ b/components/measurement/nettests/WhatsApp.js @@ -1,9 +1,7 @@ import { Box, Flex, Heading, Text } from 'ooni-components' import PropTypes from 'prop-types' import React from 'react' -import { MdPhoneAndroid } from 'react-icons/md' -import { MdWebAsset } from 'react-icons/md' -import { MdPersonAdd } from 'react-icons/md' +import { MdPersonAdd, MdPhoneAndroid, MdWebAsset } from 'react-icons/md' import { FormattedMessage, defineMessages } from 'react-intl' import styled from 'styled-components' @@ -20,7 +18,9 @@ const BugBox = styled(Box)` const WhatsAppDetails = ({ isAnomaly, scores, measurement, render }) => { const testKeys = measurement.test_keys const tcp_connect = testKeys.tcp_connect - let registrationServerAccessible, webAccessible, endpointsAccessible + let registrationServerAccessible + let webAccessible + let endpointsAccessible try { registrationServerAccessible = scores.analysis.registration_server_accessible @@ -112,6 +112,7 @@ const WhatsAppDetails = ({ isAnomaly, scores, measurement, render }) => { content={ <> {tcp_connect.map((connection, index) => ( + // biome-ignore lint/suspicious/noArrayIndexKey: diff --git a/components/measurement/useTestKeyController.js b/components/measurement/useTestKeyController.js index a1fbbe7c..ad6a88d8 100644 --- a/components/measurement/useTestKeyController.js +++ b/components/measurement/useTestKeyController.js @@ -17,7 +17,7 @@ return ( */ import { Flex } from 'ooni-components' -import React, { useState, useCallback } from 'react' +import React, { useCallback, useState } from 'react' const setValues = (input, value = true) => { // Maps each key in `test_keys` to a boolean value, by default true @@ -35,6 +35,7 @@ export const useTestKeyController = (testKeysInitial) => { const [keysMap, setKeysMap] = useState(setValues(testKeysInitial)) const TestKeyController = () => { + // biome-ignore lint/correctness/useExhaustiveDependencies: const onChange = useCallback( (event) => { const { name, checked } = event.target @@ -64,6 +65,7 @@ export const useTestKeyController = (testKeysInitial) => { return ( {Object.keys(keysMap).map((k, i) => ( + // biome-ignore lint/suspicious/noArrayIndexKey: { {categoryCodes .sort((a, b) => (a[1] < b[1] ? -1 : a[1] > b[1] ? 1 : 0)) .map(([code, label], idx) => ( + // biome-ignore lint/suspicious/noArrayIndexKey: @@ -75,6 +76,7 @@ const testsWithAnomalyStatus = [ const testsWithConfirmedStatus = ['XX', 'web_connectivity'] +// biome-ignore lint/style/useDefaultParameterLast: function isValidFilterForTestname(testName = 'XX', arrayWithMapping) { // Should domain filter be shown for `testsWithValidDomain`? return arrayWithMapping.includes(testName) @@ -240,6 +242,7 @@ const FilterSidebar = ({ > {countryOptions.map((v, idx) => { return ( + // biome-ignore lint/suspicious/noArrayIndexKey: diff --git a/components/search/Loader.js b/components/search/Loader.js index 80fe9ad8..626f446a 100644 --- a/components/search/Loader.js +++ b/components/search/Loader.js @@ -27,6 +27,7 @@ export const Loader = ({ rows = 10 }) => ( {Array(rows) .fill('') .map((e, i) => ( + // biome-ignore lint/suspicious/noArrayIndexKey: ))} diff --git a/components/search/ResultsList.js b/components/search/ResultsList.js index 717209c7..35a460b8 100644 --- a/components/search/ResultsList.js +++ b/components/search/ResultsList.js @@ -1,4 +1,3 @@ -import url from 'url' import NLink from 'next/link' import { Box, Flex, Text } from 'ooni-components' import PropTypes from 'prop-types' @@ -6,8 +5,9 @@ import React from 'react' import { defineMessages, useIntl } from 'react-intl' import dayjs from 'services/dayjs' import styled from 'styled-components' +// biome-ignore lint/style/useNodejsImportProtocol: +import url from 'url' -import { testNames } from '/components/test-info' import Flag from '../Flag' import { colorAnomaly, @@ -15,6 +15,7 @@ import { colorError, colorNormal, } from '../colors' +import { testNames } from '/components/test-info' const StyledResultTag = styled.div` border-radius: 16px; @@ -269,15 +270,15 @@ const getIndicators = ({ failure, intl, }) => { - let color = '', - tag = null + let color = '' + let tag = null if (testsWithStates.includes(test_name)) { if (imTests.includes(test_name) && Object.entries(scores).length === 0) { return [color, tag] } const computedMessageIdPrefix = `Search.${test_name}.Results` - const blockingType = scores.analysis && scores.analysis.blocking_type + const blockingType = scores?.analysis?.blocking_type if (failure === true) { color = colorError @@ -438,6 +439,7 @@ const ResultsList = ({ results }) => { {results.map((msmt, idx) => { + // biome-ignore lint/suspicious/noArrayIndexKey: return })} diff --git a/components/utils.js b/components/utils.js index f2748c20..4b203aa3 100644 --- a/components/utils.js +++ b/components/utils.js @@ -14,10 +14,10 @@ export const getTestMetadata = (testName) => { return metadata } const group = testGroups[test.group] - metadata['name'] = test.name - metadata['groupName'] = group.name - metadata['icon'] = group.icon - metadata['color'] = group.color - metadata['info'] = test.info + metadata.name = test.name + metadata.groupName = group.name + metadata.icon = group.icon + metadata.color = group.color + metadata.info = test.info return metadata } diff --git a/cypress/e2e/mat.e2e.cy.js b/cypress/e2e/mat.e2e.cy.js index 132cf775..1c7fe0fa 100644 --- a/cypress/e2e/mat.e2e.cy.js +++ b/cypress/e2e/mat.e2e.cy.js @@ -6,7 +6,7 @@ describe('MAT Tests', () => { '?probe_cc=IR&test_name=web_connectivity&category_code=NEWS&since=2022-03-01&until=2022-04-01&axis_x=measurement_start_day&axis_y=probe_asn' const search2Obj = (url) => { - const u = new URL('http://localhost/' + url) + const u = new URL(`http://localhost/${url}`) return Object.fromEntries(u.searchParams.entries()) } cy.visit(testPath + testParams) @@ -29,6 +29,7 @@ describe('MAT Tests', () => { cy.get('h1').contains('Measurement Aggregation Toolkit') }) + // biome-ignore lint/suspicious/noFocusedTests: it.only('Clicking Submit button loads table and charts', () => { cy.get('button[data-test-id=mat-form-submit]').click() cy.contains('Web Connectivity Test') diff --git a/pages/404.js b/pages/404.js index e57e31a5..ab8438dd 100644 --- a/pages/404.js +++ b/pages/404.js @@ -42,6 +42,7 @@ const Custom404 = () => { {(message) => ( + // biome-ignore lint/a11y/useValidAnchor: { diff --git a/pages/_document.js b/pages/_document.js index cc3cb56b..fea53aeb 100644 --- a/pages/_document.js +++ b/pages/_document.js @@ -2,8 +2,8 @@ import { getDirection } from 'components/withIntl' // updated based on documentation: https://github.com/vercel/next.js/blob/canary/examples/with-styled-components/pages/_document.tsx import Document, { DocumentContext, - Html, Head, + Html, Main, NextScript, } from 'next/document' @@ -38,7 +38,7 @@ export default class MyDocument extends Document { src="https://eu.umami.is/script.js" data-website-id="6c9769aa-4b46-4d8d-82a9-a5a6d77206c4" data-domains="explorer.ooni.org" - > + />
diff --git a/pages/api/cloudflare.js b/pages/api/cloudflare.js index f57d8dc8..7449baf3 100644 --- a/pages/api/cloudflare.js +++ b/pages/api/cloudflare.js @@ -51,8 +51,8 @@ const cloudflareHandler = (req, res) => { const diff = dayjs(dateEnd).diff(dayjs(dateStart), 'day') const aggInterval = diff <= 30 ? '1h' : '1d' const targetParam = asn ? `asn=${asn}` : `location=${country}` - const formattedFrom = dateStart.split('.')[0] + 'Z' - const formattedTo = dateEnd.split('.')[0] + 'Z' + const formattedFrom = `${dateStart.split('.')[0]}Z` + const formattedTo = `${dateEnd.split('.')[0]}Z` return axios({ method: 'get', diff --git a/pages/api/ioda.js b/pages/api/ioda.js index 894e24b2..b64aae5d 100644 --- a/pages/api/ioda.js +++ b/pages/api/ioda.js @@ -1,4 +1,3 @@ -import https from 'https' import axios from 'axios' import dayjs from 'services/dayjs' @@ -44,12 +43,13 @@ const iodaHandler = (req, res) => { .map((item, i) => { const max = Math.max(...item.values) const values = item.values.map((val, i) => { - const time = + const time = `${ dayjs(item.from * 1000) .add(item.step * i, 'second') .utc() .toISOString() - .split('.')[0] + 'Z' + .split('.')[0] + }Z` return { x: time, y: val ? val / max : null } }) return { datasource: item.datasource, values } diff --git a/pages/country/[countryCode].js b/pages/country/[countryCode].js index 932daff1..8eab14a0 100644 --- a/pages/country/[countryCode].js +++ b/pages/country/[countryCode].js @@ -74,7 +74,7 @@ const Country = ({ }) => { return ( <> - {!!error ? ( + {error ? ( ) : ( { { since, until }, )} - {!!blockedCountries?.length ? ( + {blockedCountries?.length ? ( <> {intl.formatMessage({ id: 'Domain.CountriesBlocking.Subtitle' })} diff --git a/pages/findings/index.js b/pages/findings/index.js index 934f35f3..75946fc9 100644 --- a/pages/findings/index.js +++ b/pages/findings/index.js @@ -3,14 +3,12 @@ import HighlightBox from 'components/landing/HighlightBox' import SpinLoader from 'components/vendor/SpinLoader' import useFilterWithSort from 'hooks/useFilterWithSort' import useUser from 'hooks/useUser' -import Head from 'next/head' import NLink from 'next/link' import { Box, Button, Container, Flex, - Heading, Input, Select, Text, diff --git a/pages/index.js b/pages/index.js index 0f8f52f4..8162e669 100644 --- a/pages/index.js +++ b/pages/index.js @@ -2,7 +2,6 @@ import axios from 'axios' import Head from 'next/head' import NLink from 'next/link' -import Router from 'next/router' import { Box, Button, diff --git a/pages/measurement/[[...report_id]].js b/pages/measurement/[[...report_id]].js index e1b6abee..8d774037 100644 --- a/pages/measurement/[[...report_id]].js +++ b/pages/measurement/[[...report_id]].js @@ -28,7 +28,7 @@ export async function getServerSideProps({ query }) { full: true, } if (query.input) { - params['input'] = query.input + params.input = query.input } let response diff --git a/pages/search.js b/pages/search.js index fedc8f7f..cb09e43e 100644 --- a/pages/search.js +++ b/pages/search.js @@ -9,12 +9,12 @@ import dayjs from 'services/dayjs' import styled from 'styled-components' import dynamic from 'next/dynamic' +import { sortByKey } from '../utils' import FormattedMarkdown from '/components/FormattedMarkdown' import FilterSidebar, { queryToFilterMap, } from '/components/search/FilterSidebar' import ResultsList from '/components/search/ResultsList' -import { sortByKey } from '../utils' const Loader = dynamic(() => import('/components/search/Loader'), { ssr: false, @@ -53,8 +53,8 @@ export const getServerSideProps = async ({ query }) => { } const queryToParams = ({ query }) => { - let params = {}, - show = 50 + const params = {} + let show = 50 const supportedParams = [ 'probe_cc', 'domain', @@ -70,11 +70,11 @@ const queryToParams = ({ query }) => { if (query.show) { show = Number.parseInt(query.show) } - params['limit'] = show + params.limit = show // Allow only `failure=false`. `true` results in showing only failures - if ('failure' in query && query['failure'] === false) { - params['failure'] = false + if ('failure' in query && query.failure === false) { + params.failure = false } for (const p of supportedParams) { @@ -84,9 +84,9 @@ const queryToParams = ({ query }) => { } if (query.only) { if (query.only === 'anomalies') { - params['anomaly'] = true + params.anomaly = true } else if (query.only === 'confirmed') { - params['confirmed'] = true + params.confirmed = true } } return params @@ -125,7 +125,7 @@ const StyledPre = styled.pre` const ErrorBox = ({ error }) => { if (!error) { - return
+ return
} const { stack, ...restOfError } = error @@ -182,6 +182,7 @@ const Search = ({ countries, query: queryProp }) => { const [results, setResults] = useState([]) const [error, setError] = useState(null) + // biome-ignore lint/correctness/useExhaustiveDependencies: useEffect(() => { const q = query || queryProp const href = { @@ -275,7 +276,7 @@ const Search = ({ countries, query: queryProp }) => { if (queryParam in query) { delete query[queryParam] } - } else if (key === 'onlyFilter' && state[key] == 'all') { + } else if (key === 'onlyFilter' && state[key] === 'all') { // If the onlyFilter is not set to 'confirmed' or 'anomalies' // remove it from the path if (queryParam in query) {
+ {headerGroups.map((headerGroup, index) => ( + // biome-ignore lint/suspicious/noArrayIndexKey: +
+ key={i} + {...column.getHeaderProps(column.getSortByToggleProps())} + > {column.render('Header')} {/* Sort order indicator */} @@ -106,12 +111,18 @@ const Table = ({ columns, data }) => { ))}
{cell.render('Cell')}
+ {cell.render('Cell')} +