From 6213067f35e8a122e75d99150d6fa498419e81fa Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Sat, 25 Dec 2021 10:26:38 +0100 Subject: [PATCH] Removed default export in SortingDropdown --- src/settings/ShortUrlsList.tsx | 2 +- src/settings/Tags.tsx | 2 +- src/short-urls/ShortUrlsList.tsx | 2 +- src/tags/TagsList.tsx | 2 +- src/utils/SortingDropdown.tsx | 2 +- src/visits/charts/SortableBarChartCard.tsx | 2 +- test/settings/ShortUrlsList.test.tsx | 2 +- test/settings/Tags.test.tsx | 2 +- test/short-urls/ShortUrlsList.test.tsx | 2 +- test/tags/TagsList.test.tsx | 2 +- test/utils/SortingDropdown.test.tsx | 2 +- test/visits/charts/SortableBarChartCard.test.tsx | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/settings/ShortUrlsList.tsx b/src/settings/ShortUrlsList.tsx index 57407afc..06ca899b 100644 --- a/src/settings/ShortUrlsList.tsx +++ b/src/settings/ShortUrlsList.tsx @@ -1,6 +1,6 @@ import { FC } from 'react'; import { FormGroup } from 'reactstrap'; -import SortingDropdown from '../utils/SortingDropdown'; +import { SortingDropdown } from '../utils/SortingDropdown'; import { SHORT_URLS_ORDERABLE_FIELDS } from '../short-urls/data'; import { SimpleCard } from '../utils/SimpleCard'; import { DEFAULT_SHORT_URLS_ORDERING, Settings, ShortUrlsListSettings } from './reducers/settings'; diff --git a/src/settings/Tags.tsx b/src/settings/Tags.tsx index 6fbc2194..02289561 100644 --- a/src/settings/Tags.tsx +++ b/src/settings/Tags.tsx @@ -3,7 +3,7 @@ import { FormGroup } from 'reactstrap'; import { SimpleCard } from '../utils/SimpleCard'; import { TagsModeDropdown } from '../tags/TagsModeDropdown'; import { capitalize } from '../utils/utils'; -import SortingDropdown from '../utils/SortingDropdown'; +import { SortingDropdown } from '../utils/SortingDropdown'; import { TAGS_ORDERABLE_FIELDS } from '../tags/data/TagsListChildrenProps'; import { Settings, TagsSettings } from './reducers/settings'; diff --git a/src/short-urls/ShortUrlsList.tsx b/src/short-urls/ShortUrlsList.tsx index a3722d38..b5887cb6 100644 --- a/src/short-urls/ShortUrlsList.tsx +++ b/src/short-urls/ShortUrlsList.tsx @@ -2,7 +2,7 @@ import { pipe } from 'ramda'; import { FC, useEffect, useMemo, useState } from 'react'; import { RouteComponentProps } from 'react-router'; import { Card } from 'reactstrap'; -import SortingDropdown from '../utils/SortingDropdown'; +import { SortingDropdown } from '../utils/SortingDropdown'; import { determineOrderDir, OrderDir } from '../utils/helpers/ordering'; import { getServerId, SelectedServer } from '../servers/data'; import { boundToMercureHub } from '../mercure/helpers/boundToMercureHub'; diff --git a/src/tags/TagsList.tsx b/src/tags/TagsList.tsx index bcc3934f..5076b7f9 100644 --- a/src/tags/TagsList.tsx +++ b/src/tags/TagsList.tsx @@ -10,7 +10,7 @@ import { ShlinkApiError } from '../api/ShlinkApiError'; import { Topics } from '../mercure/helpers/Topics'; import { Settings, TagsMode } from '../settings/reducers/settings'; import { determineOrderDir, sortList } from '../utils/helpers/ordering'; -import SortingDropdown from '../utils/SortingDropdown'; +import { SortingDropdown } from '../utils/SortingDropdown'; import { TagsList as TagsListState } from './reducers/tagsList'; import { TagsOrderableFields, diff --git a/src/utils/SortingDropdown.tsx b/src/utils/SortingDropdown.tsx index ebc04d2c..bb41fdd3 100644 --- a/src/utils/SortingDropdown.tsx +++ b/src/utils/SortingDropdown.tsx @@ -14,7 +14,7 @@ export interface SortingDropdownProps { right?: boolean; } -export default function SortingDropdown( +export function SortingDropdown( { items, order, onChange, isButton = true, right = false }: SortingDropdownProps, ) { const handleItemClick = (fieldKey: T) => () => { diff --git a/src/visits/charts/SortableBarChartCard.tsx b/src/visits/charts/SortableBarChartCard.tsx index a627e514..da979a5f 100644 --- a/src/visits/charts/SortableBarChartCard.tsx +++ b/src/visits/charts/SortableBarChartCard.tsx @@ -4,7 +4,7 @@ import { rangeOf } from '../../utils/utils'; import { Order } from '../../utils/helpers/ordering'; import SimplePaginator from '../../common/SimplePaginator'; import { roundTen } from '../../utils/helpers/numbers'; -import SortingDropdown from '../../utils/SortingDropdown'; +import { SortingDropdown } from '../../utils/SortingDropdown'; import PaginationDropdown from '../../utils/PaginationDropdown'; import { Stats, StatsRow } from '../types'; import { HorizontalBarChart, HorizontalBarChartProps } from './HorizontalBarChart'; diff --git a/test/settings/ShortUrlsList.test.tsx b/test/settings/ShortUrlsList.test.tsx index 3c1136de..602f9586 100644 --- a/test/settings/ShortUrlsList.test.tsx +++ b/test/settings/ShortUrlsList.test.tsx @@ -2,7 +2,7 @@ import { shallow, ShallowWrapper } from 'enzyme'; import { Mock } from 'ts-mockery'; import { DEFAULT_SHORT_URLS_ORDERING, Settings, ShortUrlsListSettings } from '../../src/settings/reducers/settings'; import { ShortUrlsList } from '../../src/settings/ShortUrlsList'; -import SortingDropdown from '../../src/utils/SortingDropdown'; +import { SortingDropdown } from '../../src/utils/SortingDropdown'; import { ShortUrlsOrder } from '../../src/short-urls/data'; describe('', () => { diff --git a/test/settings/Tags.test.tsx b/test/settings/Tags.test.tsx index 8e5440a4..b745cd99 100644 --- a/test/settings/Tags.test.tsx +++ b/test/settings/Tags.test.tsx @@ -4,7 +4,7 @@ import { FormGroup } from 'reactstrap'; import { Settings, TagsMode, TagsSettings } from '../../src/settings/reducers/settings'; import { TagsModeDropdown } from '../../src/tags/TagsModeDropdown'; import { Tags } from '../../src/settings/Tags'; -import SortingDropdown from '../../src/utils/SortingDropdown'; +import { SortingDropdown } from '../../src/utils/SortingDropdown'; import { TagsOrder } from '../../src/tags/data/TagsListChildrenProps'; describe('', () => { diff --git a/test/short-urls/ShortUrlsList.test.tsx b/test/short-urls/ShortUrlsList.test.tsx index 81871a48..c87f15c9 100644 --- a/test/short-urls/ShortUrlsList.test.tsx +++ b/test/short-urls/ShortUrlsList.test.tsx @@ -7,7 +7,7 @@ import shortUrlsListCreator from '../../src/short-urls/ShortUrlsList'; import { ShortUrlsOrderableFields, ShortUrl, ShortUrlsOrder } from '../../src/short-urls/data'; import { MercureBoundProps } from '../../src/mercure/helpers/boundToMercureHub'; import { ShortUrlsList as ShortUrlsListModel } from '../../src/short-urls/reducers/shortUrlsList'; -import SortingDropdown from '../../src/utils/SortingDropdown'; +import { SortingDropdown } from '../../src/utils/SortingDropdown'; import Paginator from '../../src/short-urls/Paginator'; import { ReachableServer } from '../../src/servers/data'; import { ShortUrlListRouteParams } from '../../src/short-urls/helpers/hooks'; diff --git a/test/tags/TagsList.test.tsx b/test/tags/TagsList.test.tsx index 1378e97c..e374cf3d 100644 --- a/test/tags/TagsList.test.tsx +++ b/test/tags/TagsList.test.tsx @@ -10,7 +10,7 @@ import { TagsModeDropdown } from '../../src/tags/TagsModeDropdown'; import SearchField from '../../src/utils/SearchField'; import { Settings } from '../../src/settings/reducers/settings'; import { TagsOrderableFields } from '../../src/tags/data/TagsListChildrenProps'; -import SortingDropdown from '../../src/utils/SortingDropdown'; +import { SortingDropdown } from '../../src/utils/SortingDropdown'; describe('', () => { let wrapper: ShallowWrapper; diff --git a/test/utils/SortingDropdown.test.tsx b/test/utils/SortingDropdown.test.tsx index 934bbfb7..fdd4a3dd 100644 --- a/test/utils/SortingDropdown.test.tsx +++ b/test/utils/SortingDropdown.test.tsx @@ -3,7 +3,7 @@ import { DropdownItem, DropdownToggle } from 'reactstrap'; import { identity, values } from 'ramda'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { faSortAmountDown as caretDownIcon } from '@fortawesome/free-solid-svg-icons'; -import SortingDropdown, { SortingDropdownProps } from '../../src/utils/SortingDropdown'; +import { SortingDropdown , SortingDropdownProps } from '../../src/utils/SortingDropdown'; import { OrderDir } from '../../src/utils/helpers/ordering'; describe('', () => { diff --git a/test/visits/charts/SortableBarChartCard.test.tsx b/test/visits/charts/SortableBarChartCard.test.tsx index 338b220b..d8f7867d 100644 --- a/test/visits/charts/SortableBarChartCard.test.tsx +++ b/test/visits/charts/SortableBarChartCard.test.tsx @@ -1,6 +1,6 @@ import { shallow, ShallowWrapper } from 'enzyme'; import { range } from 'ramda'; -import SortingDropdown from '../../../src/utils/SortingDropdown'; +import { SortingDropdown } from '../../../src/utils/SortingDropdown'; import PaginationDropdown from '../../../src/utils/PaginationDropdown'; import { rangeOf } from '../../../src/utils/utils'; import { OrderDir } from '../../../src/utils/helpers/ordering';