Skip to content

Commit

Permalink
feat: remove debris and add tsconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
evavirseda committed Dec 26, 2024
1 parent 42625d3 commit 8e614f5
Show file tree
Hide file tree
Showing 29 changed files with 43 additions and 38 deletions.
2 changes: 1 addition & 1 deletion apps/core/src/components/Inputs/AddressInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import { Input, InputType } from '@iota/apps-ui-kit';
import { Close } from '@iota/ui-icons';
import { useIotaAddressValidation } from '../../hooks';
import React, { useCallback } from 'react';
import { useCallback } from 'react';
import { useField, useFormikContext } from 'formik';

export interface AddressInputProps {
Expand Down
5 changes: 3 additions & 2 deletions apps/core/src/components/buttons/ViewTxnOnExplorerButton.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
// Copyright (c) 2024 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0

import React, { JSX } from 'react';
import { Button, ButtonType, LoadingIndicator } from '@iota/apps-ui-kit';
import { ArrowTopRight } from '@iota/ui-icons';

interface ViewTxnOnExplorerButtonProps {
digest?: string;
}

export function ViewTxnOnExplorerButton({ digest }: ViewTxnOnExplorerButtonProps): JSX.Element {
export function ViewTxnOnExplorerButton({
digest,
}: ViewTxnOnExplorerButtonProps): React.JSX.Element {
return (
<Button
type={ButtonType.Outlined}
Expand Down
2 changes: 1 addition & 1 deletion apps/core/src/components/cards/BalanceChanges.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Modifications Copyright (c) 2024 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0

import React, { useMemo } from 'react';
import { useMemo } from 'react';
import { Divider, Header, KeyValueInfo, Panel } from '@iota/apps-ui-kit';
import type { BalanceChangeSummary, RenderExplorerLink } from '../../types';
import { ExplorerLinkType } from '../../enums';
Expand Down
2 changes: 1 addition & 1 deletion apps/core/src/components/cards/ObjectChanges.tsx
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, { useState } from 'react';
import { useState } from 'react';
import {
getObjectChangeLabel,
type ObjectChangesByOwner,
Expand Down
2 changes: 1 addition & 1 deletion apps/core/src/components/collapsible/Collapsible.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Modifications Copyright (c) 2024 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0

import React, { useState, type ReactNode } from 'react';
import { useState, type ReactNode } from 'react';
import { Accordion, AccordionContent, AccordionHeader, Title, TitleSize } from '@iota/apps-ui-kit';

interface CollapsibleProps extends React.PropsWithChildren {
Expand Down
2 changes: 1 addition & 1 deletion apps/core/src/components/lists/ExpandableList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// SPDX-License-Identifier: Apache-2.0

import clsx from 'clsx';
import React, { useMemo, useState, type ReactNode } from 'react';
import { useMemo, useState, type ReactNode } from 'react';
import { TriangleDown } from '@iota/ui-icons';
import { Button, ButtonSize, ButtonType } from '@iota/apps-ui-kit';

Expand Down
13 changes: 13 additions & 0 deletions apps/core/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"compilerOptions": {
"jsx": "react-jsx",
"module": "ESNext",
"target": "ES2020",
"strict": true,
"esModuleInterop": true,
"moduleResolution": "node",
"skipLibCheck": true
},
"include": ["src"],
"exclude": ["node_modules", "dist"]
}
2 changes: 1 addition & 1 deletion apps/explorer/src/pages/validator/ValidatorDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import { useGetValidatorsApy, useGetValidatorsEvents } from '@iota/core';
import { useIotaClientQuery } from '@iota/dapp-kit';
import { type IotaSystemStateSummary } from '@iota/iota-sdk/client';
import React, { useMemo } from 'react';
import { useMemo } from 'react';
import { useParams } from 'react-router-dom';
import { PageLayout, ValidatorMeta, ValidatorStats } from '~/components';
import { VALIDATOR_LOW_STAKE_GRACE_PERIOD } from '~/lib/constants';
Expand Down
2 changes: 1 addition & 1 deletion apps/explorer/src/pages/validators/Validators.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Modifications Copyright (c) 2024 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0

import React, { type JSX, useMemo } from 'react';
import { type JSX, useMemo } from 'react';
import { roundFloat, useFormatCoin, useGetValidatorsApy, useGetValidatorsEvents } from '@iota/core';
import {
DisplayStats,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) 2024 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0

import React, { ReactNode } from 'react';
import { ReactNode } from 'react';
import cx from 'classnames';
import { Copy, Info } from '@iota/ui-icons';
import { ValueSize } from './keyValue.enums';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) 2024 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0

import React, { PropsWithChildren } from 'react';
import { PropsWithChildren } from 'react';
import cx from 'classnames';
import { ArrowRight } from '@iota/ui-icons';
import { Button, ButtonSize, ButtonType } from '@/components';
Expand Down
2 changes: 1 addition & 1 deletion apps/ui-kit/src/lib/components/atoms/tooltip/Tooltip.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) 2024 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0

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

import React, { ReactNode } from 'react';
import { ReactNode } from 'react';
import { Tooltip, TooltipPosition } from '../../atoms';
import { Info } from '@iota/ui-icons';
import { DisplayStatsType, DisplayStatsSize } from './display-stats.enums';
Expand Down
2 changes: 1 addition & 1 deletion apps/ui-kit/src/lib/components/molecules/search/Search.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) 2024 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0

import React, { useEffect, useRef, useState } from 'react';
import { useEffect, useRef, useState } from 'react';
import cx from 'classnames';
import { Loader, Search as SearchIcon } from '@iota/ui-icons';
import { Divider, SearchBarType } from '@/components';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) 2024 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0

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

import React, { PropsWithChildren } from 'react';
import { PropsWithChildren } from 'react';
import cx from 'classnames';
import { ArrowDown } from '@iota/ui-icons';
import { Button, ButtonType } from '@/lib';
Expand Down
2 changes: 1 addition & 1 deletion apps/wallet-dashboard/app/(protected)/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
'use client';

import { Notifications } from '@/components/index';
import React, { type PropsWithChildren } from 'react';
import { type PropsWithChildren } from 'react';
import { Sidebar, TopNav } from './components';

function DashboardLayout({ children }: PropsWithChildren): JSX.Element {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) 2024 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0

import React, { useState } from 'react';
import { useState } from 'react';
import { Dialog } from '@iota/apps-ui-kit';
import { FormikProvider, useFormik } from 'formik';
import { useIotaClient, useCurrentAccount } from '@iota/dapp-kit';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) 2024 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0

import React, { useState } from 'react';
import { useState } from 'react';
import { EnterValuesFormView, ReviewValuesFormView, TransactionDetailsView } from './views';
import { CoinBalance } from '@iota/iota-sdk/client';
import { useSendCoinTransaction, useNotifications } from '@/hooks';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) 2024 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0

import React, { useMemo, useState } from 'react';
import { useMemo, useState } from 'react';
import { EnterAmountView, EnterTimelockedAmountView, SelectValidatorView } from './views';
import {
ExtendedDelegatedStake,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) 2024 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0

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

import React, { useState } from 'react';
import { useState } from 'react';
import { useCurrentAccount, useSignAndExecuteTransaction } from '@iota/dapp-kit';
import { IotaObjectData } from '@iota/iota-sdk/client';
import { useMigrationTransaction } from '@/hooks/useMigrationTransaction';
Expand Down
2 changes: 0 additions & 2 deletions apps/wallet-dashboard/components/Input.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 InputProps {
label?: string;
value: string;
Expand Down
4 changes: 2 additions & 2 deletions apps/wallet-dashboard/components/VirtualList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

'use client';

import React, { ReactNode, useEffect } from 'react';
import { ReactNode, useEffect, useRef } from 'react';
import { useVirtualizer } from '@tanstack/react-virtual';
import clsx from 'clsx';

Expand All @@ -30,7 +30,7 @@ function VirtualList<T>({
heightClassName = 'h-fit',
overflowClassName,
}: VirtualListProps<T>): JSX.Element {
const containerRef = React.useRef<HTMLDivElement | null>(null);
const containerRef = useRef<HTMLDivElement | null>(null);
const virtualizer = useVirtualizer({
// Render one more item if there is still pages to be fetched
count: hasNextPage ? items.length + 1 : items.length,
Expand Down
2 changes: 1 addition & 1 deletion apps/wallet-dashboard/components/coins/MyCoins.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) 2024 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0

import React, { useState } from 'react';
import { useState } from 'react';
import { useCurrentAccount, useIotaClientQuery } from '@iota/dapp-kit';
import { CoinBalance } from '@iota/iota-sdk/client';
import {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

'use client';

import React, { useState } from 'react';
import { useState } from 'react';
import TransactionIcon from './TransactionIcon';
import formatTimestamp from '@/lib/utils/time';
import { ExtendedTransaction, TransactionState } from '@/lib/interfaces';
Expand Down
2 changes: 1 addition & 1 deletion apps/wallet/src/ui/app/components/OutsideClickHandler.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) 2024 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0

import React, { useEffect, useRef } from 'react';
import { useEffect, useRef } from 'react';

interface OutsideClickHandlerProps {
onOutsideClick: () => void;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,7 @@
// SPDX-License-Identifier: Apache-2.0

import { type SerializedUIAccount } from '_src/background/accounts/Account';
import React, {
createContext,
useCallback,
useContext,
useState,
type ReactNode,
useRef,
} from 'react';
import { createContext, useCallback, useContext, useState, type ReactNode, useRef } from 'react';
import { toast } from 'react-hot-toast';
import { useBackgroundClient } from '../../hooks/useBackgroundClient';
import { useUnlockMutation } from '../../hooks/useUnlockMutation';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { AccountType, type SerializedUIAccount } from '_src/background/accounts/
import { AccountsFormType, useAccountsFormContext, VerifyPasswordModal } from '_components';
import { useAccountSources } from '_src/ui/app/hooks/useAccountSources';
import { useCreateAccountsMutation } from '_src/ui/app/hooks/useCreateAccountMutation';
import React, { useState } from 'react';
import { useState } from 'react';
import { useNavigate } from 'react-router-dom';
import clsx from 'clsx';

Expand Down

0 comments on commit 8e614f5

Please sign in to comment.