Skip to content

Commit

Permalink
chore: removed unused react imports (#1327)
Browse files Browse the repository at this point in the history
  • Loading branch information
ncomerci authored Oct 10, 2023
1 parent 6f25626 commit 1fbc8ac
Show file tree
Hide file tree
Showing 460 changed files with 154 additions and 773 deletions.
2 changes: 0 additions & 2 deletions gatsby-browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
*
* See: https://www.gatsbyjs.org/docs/browser-apis/
*/
import React from 'react'

import 'core-js/features/set-immediate'
import 'semantic-ui-css/semantic.min.css'
import 'balloon-css/balloon.min.css'
Expand Down
2 changes: 0 additions & 2 deletions gatsby-ssr.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
* See: https://www.gatsbyjs.org/docs/ssr-apis/
*/
// You can delete this file if you're not using it
import React from 'react'

export { wrapPageElement, wrapRootElement } from './gatsby-browser'

/**
Expand Down
2 changes: 0 additions & 2 deletions src/components/ActionCard/ActionCard.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from 'react'

import classNames from 'classnames'
import { Card } from 'decentraland-ui/dist/components/Card/Card'
import Grid from 'semantic-ui-react/dist/commonjs/collections/Grid/Grid'
Expand Down
2 changes: 1 addition & 1 deletion src/components/AddressSelect/AddressesSelect.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { KeyboardEventHandler, useEffect, useState } from 'react'
import { KeyboardEventHandler, useEffect, useState } from 'react'
import { InputActionMeta, OnChangeValue } from 'react-select'
import CreatableSelect from 'react-select/creatable'

Expand Down
4 changes: 2 additions & 2 deletions src/components/Banner/Banner.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useCallback, useEffect, useState } from 'react'
import { useCallback, useEffect, useState } from 'react'

import { Button } from 'decentraland-ui/dist/components/Button/Button'
import { Close } from 'decentraland-ui/dist/components/Close/Close'
Expand Down Expand Up @@ -76,4 +76,4 @@ function Banner({
)
}

export default React.memo(Banner)
export default Banner
2 changes: 0 additions & 2 deletions src/components/Banner/Delegation/DelegationBanner.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from 'react'

import { OPEN_CALL_FOR_DELEGATES_LINK } from '../../../constants'
import useFormatMessage from '../../../hooks/useFormatMessage'
import Delegate from '../../Icon/Delegate'
Expand Down
2 changes: 0 additions & 2 deletions src/components/Banner/RandomBanner.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from 'react'

import useNewsletterSubscription from '../../hooks/useNewsletterSubscription'
import { NewsletterSubscriptionModal } from '../Modal/NewsletterSubscriptionModal/NewsletterSubscriptionModal'

Expand Down
4 changes: 1 addition & 3 deletions src/components/Banner/Subscription/SubscriptionBanner.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from 'react'

import useFormatMessage from '../../../hooks/useFormatMessage'
import Email from '../../Icon/Email'
import Banner from '../Banner'
Expand Down Expand Up @@ -29,4 +27,4 @@ function SubscriptionBanner({ isVisible, onAction }: SubscriptionBannerProps) {
)
}

export default React.memo(SubscriptionBanner)
export default SubscriptionBanner
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useEffect, useState } from 'react'
import { useEffect, useState } from 'react'

import { userModifiedForm } from '../../entities/Proposal/utils'
import useFormatMessage from '../../hooks/useFormatMessage'
Expand Down
2 changes: 1 addition & 1 deletion src/components/BidRequest/BidRequestFundingSection.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useEffect } from 'react'
import { useEffect } from 'react'
import { Controller, useForm, useWatch } from 'react-hook-form'

import { Field as DCLField } from 'decentraland-ui/dist/components/Field/Field'
Expand Down
2 changes: 1 addition & 1 deletion src/components/BidRequest/BidRequestGeneralInfoSection.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useEffect } from 'react'
import { useEffect } from 'react'
import { useForm, useWatch } from 'react-hook-form'

import { BidRequestGeneralInfo, BidRequestGeneralInfoSchema } from '../../entities/Bid/types'
Expand Down
2 changes: 0 additions & 2 deletions src/components/BidRequest/CardSubtitle.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from 'react'

import { Loader } from 'decentraland-ui/dist/components/Loader/Loader'

import useFormatMessage from '../../hooks/useFormatMessage'
Expand Down
2 changes: 0 additions & 2 deletions src/components/Category/CategoryBanner.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from 'react'

import classNames from 'classnames'

import { CatalystType, HiringType, PoiType, ProposalType, isHiringType } from '../../entities/Proposal/types'
Expand Down
2 changes: 1 addition & 1 deletion src/components/Category/CategoryList.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useMemo } from 'react'
import { useMemo } from 'react'

import { useLocation } from '@reach/router'
import { Header } from 'decentraland-ui/dist/components/Header/Header'
Expand Down
2 changes: 1 addition & 1 deletion src/components/Category/CategoryOption.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useCallback, useEffect, useMemo, useState } from 'react'
import { useCallback, useEffect, useMemo, useState } from 'react'

import classNames from 'classnames'
import isNumber from 'lodash/isNumber'
Expand Down
2 changes: 0 additions & 2 deletions src/components/Category/CategoryPill.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from 'react'

import classNames from 'classnames'
import { useMobileMediaQuery } from 'decentraland-ui/dist/components/Media/Media'

Expand Down
2 changes: 1 addition & 1 deletion src/components/Charts/LineChart.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useEffect, useMemo, useRef, useState } from 'react'
import { useEffect, useMemo, useRef, useState } from 'react'
import { Chart } from 'react-chartjs-2'
import { useIntl } from 'react-intl'

Expand Down
2 changes: 1 addition & 1 deletion src/components/Charts/ProposalVPChart.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useEffect, useMemo, useRef, useState } from 'react'
import { useEffect, useMemo, useRef, useState } from 'react'
import { Chart } from 'react-chartjs-2'

import { ChartData, Chart as ChartJS, ScriptableTooltipContext } from 'chart.js'
Expand Down
2 changes: 0 additions & 2 deletions src/components/Comments/Comment.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from 'react'

import DOMPurify from 'dompurify'
import isEthereumAddress from 'validator/lib/isEthereumAddress'

Expand Down
2 changes: 1 addition & 1 deletion src/components/Comments/Comments.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useEffect, useMemo, useState } from 'react'
import { useEffect, useMemo, useState } from 'react'

import classNames from 'classnames'
import { Button } from 'decentraland-ui/dist/components/Button/Button'
Expand Down
2 changes: 0 additions & 2 deletions src/components/Common/ArticleSectionHeading.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from 'react'

import Heading from './Typography/Heading'

import './ArticleSectionHeading.css'
Expand Down
2 changes: 0 additions & 2 deletions src/components/Common/Avatar.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from 'react'

import classNames from 'classnames'
import { AvatarFace } from 'decentraland-ui/dist/components/AvatarFace/AvatarFace'

Expand Down
2 changes: 0 additions & 2 deletions src/components/Common/BoxTabs.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from 'react'

import { Tabs } from 'decentraland-ui/dist/components/Tabs/Tabs'

import './BoxTabs.css'
Expand Down
2 changes: 0 additions & 2 deletions src/components/Common/BoxTabsContainer.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from 'react'

import classNames from 'classnames'

import './BoxTabsContainer.css'
Expand Down
2 changes: 0 additions & 2 deletions src/components/Common/BoxTabsContentContainer.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from 'react'

import './BoxTabsContentContainer.css'

interface Props {
Expand Down
2 changes: 0 additions & 2 deletions src/components/Common/DateTooltip.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from 'react'

import LocalizedFormat from 'dayjs/plugin/localizedFormat'

import Time from '../../utils/date/Time'
Expand Down
1 change: 0 additions & 1 deletion src/components/Common/DistributionBar/DistributionBar.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react'
import Skeleton from 'react-loading-skeleton'

import classNames from 'classnames'
Expand Down
2 changes: 0 additions & 2 deletions src/components/Common/DistributionBar/DistributionBarItem.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from 'react'

import classNames from 'classnames'

import { getFormattedPercentage } from '../../../helpers'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from 'react'

import { Popup } from 'decentraland-ui/dist/components/Popup/Popup'

import useFormatMessage from '../../../hooks/useFormatMessage'
Expand Down
2 changes: 0 additions & 2 deletions src/components/Common/Divider.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from 'react'

import classNames from 'classnames'

import './Divider.css'
Expand Down
2 changes: 0 additions & 2 deletions src/components/Common/Empty.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from 'react'

import classNames from 'classnames'
import { Button } from 'decentraland-ui/dist/components/Button/Button'

Expand Down
1 change: 0 additions & 1 deletion src/components/Common/Form/Field.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react'
import { Control, Controller, FieldValues, Path, PathValue } from 'react-hook-form'

import { Field as DCLField, FieldProps } from 'decentraland-ui/dist/components/Field/Field'
Expand Down
1 change: 0 additions & 1 deletion src/components/Common/Form/MarkdownField.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react'
import { Control, Controller, FieldValues, Path, PathValue } from 'react-hook-form'

import MarkdownTextarea from 'decentraland-gatsby/dist/components/Form/MarkdownTextarea'
Expand Down
1 change: 0 additions & 1 deletion src/components/Common/Form/TextArea.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react'
import { Control, Controller, FieldValues, Path, PathValue } from 'react-hook-form'

import {
Expand Down
2 changes: 0 additions & 2 deletions src/components/Common/FullWidthButton.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from 'react'

import classNames from 'classnames'
import { Button } from 'decentraland-ui/dist/components/Button/Button'

Expand Down
2 changes: 1 addition & 1 deletion src/components/Common/MobileSlider.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useRef } from 'react'
import { useRef } from 'react'
import Flickity, { FlickityOptions } from 'react-flickity-component'

import classNames from 'classnames'
Expand Down
2 changes: 0 additions & 2 deletions src/components/Common/Pill.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from 'react'

import classNames from 'classnames'

import './Pill.css'
Expand Down
2 changes: 0 additions & 2 deletions src/components/Common/ProgressBar.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from 'react'

import './ProgressBar.css'

interface Props {
Expand Down
1 change: 0 additions & 1 deletion src/components/Common/SkeletonBars.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react'
import Skeleton from 'react-loading-skeleton'
import 'react-loading-skeleton/dist/skeleton.css'

Expand Down
2 changes: 0 additions & 2 deletions src/components/Common/SnapshotRedirectButton.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from 'react'

import { Button } from 'decentraland-ui/dist/components/Button/Button'

import { ProposalAttributes } from '../../entities/Proposal/types'
Expand Down
2 changes: 0 additions & 2 deletions src/components/Common/SubLabel.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from 'react'

import Markdown from './Typography/Markdown'
import Text from './Typography/Text'

Expand Down
2 changes: 0 additions & 2 deletions src/components/Common/Typography/Heading.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from 'react'

import classNames from 'classnames'

import './Heading.css'
Expand Down
2 changes: 0 additions & 2 deletions src/components/Common/Typography/Label.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from 'react'

import './Label.css'

interface Props {
Expand Down
2 changes: 0 additions & 2 deletions src/components/Common/Typography/Link.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from 'react'

import classNames from 'classnames'

import { navigate } from '../../../utils/locations'
Expand Down
2 changes: 0 additions & 2 deletions src/components/Common/Typography/LinkWithTitle.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from 'react'

import { useQuery } from '@tanstack/react-query'

import { Governance } from '../../../clients/Governance'
Expand Down
2 changes: 0 additions & 2 deletions src/components/Common/Typography/List.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from 'react'

import classNames from 'classnames'

import './List.css'
Expand Down
2 changes: 0 additions & 2 deletions src/components/Common/Typography/ListItem.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from 'react'

import classNames from 'classnames'

type ListItemProps = React.LiHTMLAttributes<HTMLLIElement>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Common/Typography/Markdown.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useMemo } from 'react'
import { useMemo } from 'react'
import ReactMarkdown, { Components, Options } from 'react-markdown'

import classNames from 'classnames'
Expand Down
2 changes: 0 additions & 2 deletions src/components/Common/Username.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from 'react'

import classNames from 'classnames'
import { Address } from 'decentraland-ui/dist/components/Address/Address'
import { Blockie } from 'decentraland-ui/dist/components/Blockie/Blockie'
Expand Down
2 changes: 1 addition & 1 deletion src/components/Context/BurgerMenuStatusContext.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { createContext, useState } from 'react'
import { createContext, useState } from 'react'

import { useProposalsSearchParams } from '../../hooks/useProposalsSearchParams'

Expand Down
2 changes: 1 addition & 1 deletion src/components/Context/IdentityModalContext.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { createContext, useState } from 'react'
import { createContext, useState } from 'react'

import useAuthContext from 'decentraland-gatsby/dist/context/Auth/useAuthContext'
import useTrackContext from 'decentraland-gatsby/dist/context/Track/useTrackContext'
Expand Down
2 changes: 1 addition & 1 deletion src/components/Debug/BadgesAdmin.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useState } from 'react'
import { useState } from 'react'

import { Button } from 'decentraland-ui/dist/components/Button/Button'
import { Field } from 'decentraland-ui/dist/components/Field/Field'
Expand Down
2 changes: 1 addition & 1 deletion src/components/Debug/BudgetsUpdate.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useState } from 'react'
import { useState } from 'react'

import { Button } from 'decentraland-ui/dist/components/Button/Button'

Expand Down
2 changes: 1 addition & 1 deletion src/components/Debug/EnvStatus.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useState } from 'react'
import { useState } from 'react'

import { Button } from 'decentraland-ui/dist/components/Button/Button'
import { Field } from 'decentraland-ui/dist/components/Field/Field'
Expand Down
2 changes: 1 addition & 1 deletion src/components/Debug/ErrorReporting.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useState } from 'react'
import { useState } from 'react'

import { Button } from 'decentraland-ui/dist/components/Button/Button'
import { Field } from 'decentraland-ui/dist/components/Field/Field'
Expand Down
2 changes: 1 addition & 1 deletion src/components/Debug/HttpStatus.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useState } from 'react'
import { useState } from 'react'
import { SubmitHandler, useForm } from 'react-hook-form'

import { Button } from 'decentraland-ui/dist/components/Button/Button'
Expand Down
2 changes: 1 addition & 1 deletion src/components/Debug/Snapshot.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useState } from 'react'
import { useState } from 'react'

import { Button } from 'decentraland-ui/dist/components/Button/Button'
import { Field } from 'decentraland-ui/dist/components/Field/Field'
Expand Down
2 changes: 1 addition & 1 deletion src/components/Debug/SnapshotStatus.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useEffect, useState } from 'react'
import { useEffect, useState } from 'react'

import classNames from 'classnames'

Expand Down
2 changes: 1 addition & 1 deletion src/components/Debug/TriggerFunction.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useState } from 'react'
import { useState } from 'react'

import { Button } from 'decentraland-ui/dist/components/Button/Button'
import { SelectField } from 'decentraland-ui/dist/components/SelectField/SelectField'
Expand Down
2 changes: 1 addition & 1 deletion src/components/Debug/UploadBadgeSpec.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useState } from 'react'
import { useState } from 'react'
import { SubmitHandler, useForm } from 'react-hook-form'

import { Button } from 'decentraland-ui/dist/components/Button/Button'
Expand Down
2 changes: 0 additions & 2 deletions src/components/Delegation/DelegatedToAddressEmptyCard.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from 'react'

import useFormatMessage from '../../hooks/useFormatMessage'
import Empty from '../Common/Empty'
import Scale from '../Icon/Scale'
Expand Down
2 changes: 0 additions & 2 deletions src/components/Delegation/DelegatedToUserEmptyCard.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from 'react'

import useFormatMessage from '../../hooks/useFormatMessage'
import Empty from '../Common/Empty'
import Scale from '../Icon/Scale'
Expand Down
2 changes: 1 addition & 1 deletion src/components/Delegation/DelegatesTable.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useState } from 'react'
import { useState } from 'react'

import { Table } from 'decentraland-ui/dist/components/Table/Table'

Expand Down
2 changes: 1 addition & 1 deletion src/components/Delegation/DelegatesTableRow.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useState } from 'react'
import { useState } from 'react'
import { useIntl } from 'react-intl'

import classNames from 'classnames'
Expand Down
Loading

0 comments on commit 1fbc8ac

Please sign in to comment.