Skip to content

Commit

Permalink
♻️ Remove unused import #2610
Browse files Browse the repository at this point in the history
  • Loading branch information
millianapia committed Jan 8, 2025
1 parent 21e64b3 commit a3fc3b5
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 29 deletions.
28 changes: 0 additions & 28 deletions web/pageComponents/shared/search/pagination/PaginationItem.tsx
Original file line number Diff line number Diff line change
@@ -1,36 +1,8 @@
import { Button } from '@core/Button'
import { usePagination } from 'react-instantsearch'
import styled from 'styled-components'

// Based on: https://github.com/algolia/react-instantsearch/blob/master/examples/hooks/components/Pagination.tsx

const StyledListItem = styled.li`
display: inline-block;
`

const PaginationLink = styled(Button)<{ isCurrent?: boolean }>`
width: 44px;
height: 44px;
color: var(--pagination-btn-text-color);
${({ isCurrent }) =>
isCurrent && {
background: 'var(--pagination-btn-background-active)',
color: 'var(--pagination-btn-text-color-active)',
}}
:hover {
color: var(--pagination-btn-text-color-active);
:disabled {
color: var(--pagination-btn-disabled);
}
}
:disabled {
cursor: auto;
color: var(--pagination-btn-disabled);
}
`

export function isModifierClick(event: React.MouseEvent) {
const isMiddleClick = event.button === 1
return Boolean(isMiddleClick || event.altKey || event.ctrlKey || event.metaKey || event.shiftKey)
Expand Down
2 changes: 1 addition & 1 deletion web/templates/newsroom/Filters/SelectedFilters.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { TransformableIcon } from '../../../icons/TransformableIcon'
import { isModifierClick } from '../../../pageComponents/shared/search/simplePagination/PaginationItem'
import { forwardRef, HTMLAttributes } from 'react'
import { useClearRefinements, useCurrentRefinements, UseRefinementListProps, useSearchBox } from 'react-instantsearch'
import { useClearRefinements, useCurrentRefinements, UseRefinementListProps } from 'react-instantsearch'
import { close_circle_outlined, close } from '@equinor/eds-icons'
import { Typography } from '@core/Typography'
import { FormattedMessage } from 'react-intl'
Expand Down

0 comments on commit a3fc3b5

Please sign in to comment.