Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(tooling): remove unnecessary import React from 'react' #4612

Open
wants to merge 9 commits into
base: develop
Choose a base branch
from
1 change: 0 additions & 1 deletion apps/core/src/components/Inputs/SendTokenFormInput.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright (c) 2024 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0

import React from 'react';
import { ButtonPill, Input, InputType } from '@iota/apps-ui-kit';
import { CoinStruct } from '@iota/iota-sdk/client';
import { useFormatCoin, useGasBudgetEstimation } from '../../hooks';
Expand Down
1 change: 0 additions & 1 deletion apps/core/src/components/QR.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright (c) 2024 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0

import React from 'react';
import { QRCodeSVG } from 'qrcode.react';

export enum QRLevel {
Expand Down
1 change: 0 additions & 1 deletion apps/core/src/components/cards/ObjectChangeDisplay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// Modifications Copyright (c) 2024 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0

import React from 'react';
import { type IotaObjectChangeWithDisplay, ExplorerLinkType, ImageIcon } from '../../';
import { Card, CardAction, CardActionType, CardBody, CardImage, CardType } from '@iota/apps-ui-kit';
import { ArrowTopRight } from '@iota/ui-icons';
Expand Down
1 change: 0 additions & 1 deletion apps/core/src/components/coin/CoinItem.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright (c) 2024 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0

import React from 'react';
import {
Card,
CardAction,
Expand Down
1 change: 0 additions & 1 deletion apps/core/src/components/gas/GasFees.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// Modifications Copyright (c) 2024 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0

import React from 'react';
import { TitleSize, Badge, BadgeType, Title, Panel } from '@iota/apps-ui-kit';
import { Collapsible, GasSummary, type RenderExplorerLink, type GasSummaryType } from '../../';

Expand Down
1 change: 0 additions & 1 deletion apps/core/src/components/gas/GasSummary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// Modifications Copyright (c) 2024 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0

import React from 'react';
import { ExplorerLinkType, useFormatCoin, type GasSummaryType } from '../../';
import { RenderExplorerLink } from '../../types';
import { formatAddress, IOTA_TYPE_ARG } from '@iota/iota-sdk/utils';
Expand Down
1 change: 0 additions & 1 deletion apps/core/src/components/stake/StakedCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { useIotaClientQuery } from '@iota/dapp-kit';
import { ImageIcon } from '../icon';
import { ExtendedDelegatedStake } from '../../utils';
import { useFormatCoin, useStakeRewardStatus } from '../../hooks';
import React from 'react';

interface StakedCardProps {
extendedStake: ExtendedDelegatedStake;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright (c) 2024 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0

import React from 'react';
import { InfoBox, InfoBoxStyle, InfoBoxType } from '@iota/apps-ui-kit';
import { formatDate, type useTransactionSummary } from '../../hooks';
import { CheckmarkFilled } from '@iota/ui-icons';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// Modifications Copyright (c) 2024 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0

import React from 'react';
import { ImageIconSize, CoinIcon } from '../..';
import {
Card,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// Modifications Copyright (c) 2024 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0

import React from 'react';
import { Divider, KeyValueInfo, Panel, TooltipPosition } from '@iota/apps-ui-kit';
import { type GasSummaryType, useStakeTxnInfo, GasSummary } from '../../../';
import { RenderExplorerLink } from '../../../types';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// Modifications Copyright (c) 2024 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0

import React from 'react';
import { TransactionAmount } from '../amount';
import type { IotaEvent } from '@iota/iota-sdk/client';
import { IOTA_TYPE_ARG } from '@iota/iota-sdk/utils';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) Mysten Labs, Inc.
// Modifications Copyright (c) 2024 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0
import React from 'react';

import { type TransactionSummaryType } from '../../..';
import { BalanceChanges, ObjectChanges } from '../../cards';
import { LoadingIndicator, Title, TitleSize } from '@iota/apps-ui-kit';
Expand Down
1 change: 0 additions & 1 deletion apps/explorer/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { QueryClientProvider } from '@tanstack/react-query';
import React from 'react';
import ReactDOM from 'react-dom/client';
import { RouterProvider } from 'react-router-dom';

import { growthbook, initAmplitude, initSentry, queryClient } from './lib/utils';
import { router } from './pages';

Expand Down
1 change: 0 additions & 1 deletion apps/ui-kit/src/lib/components/atoms/badge/Badge.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright (c) 2024 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0

import React from 'react';
import cx from 'classnames';
import { BadgeType } from './badge.enums';
import { BACKGROUND_COLORS, BADGE_TEXT_CLASS, BORDER_COLORS, TEXT_COLORS } from './badge.classes';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright (c) 2024 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0

import React from 'react';
import {
BACKGROUND_COLORS,
BACKGROUND_COLORS_SELECTED,
Expand Down
1 change: 0 additions & 1 deletion apps/ui-kit/src/lib/components/atoms/button/Button.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright (c) 2024 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0

import React from 'react';
import { ButtonHtmlType, ButtonSize, ButtonType } from './button.enums';
import {
PADDINGS,
Expand Down
1 change: 0 additions & 1 deletion apps/ui-kit/src/lib/components/atoms/divider/Divider.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright (c) 2024 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0

import React from 'react';
import { DividerType } from './divider.enums';
import cx from 'classnames';
import { BACKGROUND_COLORS, DIVIDER_FULL_WIDTH } from './divider.classes';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright (c) 2024 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0

import React from 'react';
import cx from 'classnames';
import { InfoBoxStyle, InfoBoxType } from './info-box.enums';
import { BACKGROUND_COLORS, ICON_COLORS } from './info-box.classes';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright (c) 2024 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0

import React from 'react';
import cx from 'classnames';
import { LabelTextSize } from './labelText.enums';
import { LABEL_TEXT_SIZE, SUPPORTING_TEXT_SIZE, TEXT_SIZE } from './labelText.classes';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright (c) 2024 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0

import React from 'react';
import cx from 'classnames';
import { Loader } from '@iota/ui-icons';

Expand Down
1 change: 0 additions & 1 deletion apps/ui-kit/src/lib/components/atoms/panel/Panel.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright (c) 2024 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0

import React from 'react';
import cx from 'classnames';

interface PanelProps {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright (c) 2024 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0

import React from 'react';
import cx from 'classnames';
import { RadioOn, RadioOff } from '@iota/ui-icons';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright (c) 2024 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0

import React from 'react';
import { VisualAssetType } from './visual-asset-card.enums';
import { ButtonUnstyled } from '../button';
import { MoreHoriz } from '@iota/ui-icons';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright (c) 2024 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0

import React from 'react';
import cx from 'classnames';
import { ButtonUnstyled } from '../../atoms/button';
import { Badge, BadgeType } from '../../atoms';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright (c) 2024 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0

import React from 'react';
import cx from 'classnames';
import { Copy, ArrowTopRight } from '@iota/ui-icons';
import { ButtonUnstyled } from '../../atoms/button';
Expand Down
1 change: 0 additions & 1 deletion apps/ui-kit/src/lib/components/molecules/card/Card.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright (c) 2024 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0

import React from 'react';
import cx from 'classnames';
import { CARD_DISABLED_CLASSES, CARD_TYPE_CLASSES } from './card.classes';
import { CardType } from './card.enums';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright (c) 2024 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0

import React from 'react';
import cx from 'classnames';
import { ImageType, ImageShape } from './card.enums';
import { IMAGE_BG_CLASSES, IMAGE_VARIANT_CLASSES } from './card.classes';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright (c) 2024 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0

import React from 'react';
import { NavbarItemHorizontal } from './NavbarItemHorizontal';
import { NavbarItemVertical } from './NavbarItemVertical';
import { NavbarItemType } from './navbarItem.enums';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright (c) 2024 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0

import React from 'react';
import cx from 'classnames';
import {
BADGE_WITH_TEXT,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright (c) 2024 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0

import React from 'react';
import cx from 'classnames';
import {
SELECTED_BACKGROUND,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Copyright (c) 2024 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0
import React from 'react';

import { useState } from 'react';
import { SortByDown, SortByUp } from '@iota/ui-icons';
import cx from 'classnames';
import { Checkbox } from '@/lib';
Expand Down Expand Up @@ -64,7 +65,7 @@ export function TableHeaderCell({
onSortClick,
onCheckboxChange,
}: TableHeaderCellProps): JSX.Element {
const [sortOrder, setSortOrder] = React.useState<TableHeaderCellSortOrder | null>(
const [sortOrder, setSortOrder] = useState<TableHeaderCellSortOrder | null>(
TableHeaderCellSortOrder.Asc,
);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright (c) 2024 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0

import React from 'react';
import { ArrowBack } from '@iota/ui-icons';
import cx from 'classnames';
import { Button, ButtonType, NavbarItem, NavbarItemType } from '@/components';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import { Button } from '@/lib';
import { Showcase } from '@/storybook/blocks';
import { VARIABLE_GAP_CLASSES, VARIABLE_PADDING_CLASSES } from '@/storybook/constants';
import React from 'react';

export function VariableSpacingShowcase() {
return (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright (c) 2024 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0

import React from 'react';
import type { Meta, StoryObj } from '@storybook/react';
import { DisplayStats, TooltipPosition, DisplayStatsType, DisplayStatsSize } from '@/components';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright (c) 2024 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0

import React from 'react';
import type { Meta, StoryObj } from '@storybook/react';
import { NavbarItem, NavbarItemType } from '@/components';
import { Home } from '@iota/ui-icons';
Expand Down
1 change: 0 additions & 1 deletion apps/wallet-dashboard/app/(protected)/activity/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

'use client';

import React from 'react';
import { Panel, Title, TitleSize } from '@iota/apps-ui-kit';
import { TransactionsList } from '@/components';

Expand Down
1 change: 0 additions & 1 deletion apps/wallet-dashboard/components/AppList/AppList.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright (c) 2024 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0

import React from 'react';
import Image from 'next/image';
import { useAppsBackend } from '@iota/core';
import { useQuery } from '@tanstack/react-query';
Expand Down
1 change: 0 additions & 1 deletion apps/wallet-dashboard/components/Banner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// SPDX-License-Identifier: Apache-2.0

import { Button, ButtonSize, ButtonType, Panel } from '@iota/apps-ui-kit';
import React from 'react';

interface BannerProps {
videoSrc: string;
Expand Down
4 changes: 2 additions & 2 deletions apps/wallet-dashboard/components/Box.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// Copyright (c) 2024 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0

import React from 'react';
import { ReactNode } from 'react';

interface BoxProps {
children: React.ReactNode;
children: ReactNode;
title?: string;
}

Expand Down
2 changes: 0 additions & 2 deletions apps/wallet-dashboard/components/Buttons/Button.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Copyright (c) 2024 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0

import React from 'react';

interface ButtonProps {
onClick?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
children: React.ReactNode;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright (c) 2024 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0

import React from 'react';
import { ExplorerLinkType, useNftDetails, Collapsible, useNFTBasicData } from '@iota/core';
import {
Button,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright (c) 2024 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0

import React from 'react';
import { AddressInput, useNftDetails } from '@iota/core';
import { useFormikContext } from 'formik';
import { DialogLayoutFooter, DialogLayoutBody } from '../../layout';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright (c) 2024 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0

import React from 'react';
import {
ExtendedDelegatedStake,
ImageIcon,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright (c) 2024 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0

import React from 'react';
import { useFormatCoin, useStakeTxnInfo } from '@iota/core';
import { IOTA_TYPE_ARG } from '@iota/iota-sdk/utils';
import {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright (c) 2024 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0

import React from 'react';
import { useFormatCoin, useBalance, CoinFormat, parseAmount, useCoinMetadata } from '@iota/core';
import { IOTA_TYPE_ARG } from '@iota/iota-sdk/utils';
import { useFormikContext } from 'formik';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
// Copyright (c) 2024 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0

import React from 'react';
import { Button, Header } from '@iota/apps-ui-kit';

import { Validator } from './Validator';
import { DialogLayout, DialogLayoutBody, DialogLayoutFooter } from '../../layout';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright (c) 2024 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0

import React from 'react';
import { MigrationObjectLoading, VirtualList } from '@/components';
import { useCurrentAccount } from '@iota/dapp-kit';
import { IotaObjectData } from '@iota/iota-sdk/client';
Expand Down
Loading
Loading