Skip to content

Commit

Permalink
chore: consistently sorts imports using biome
Browse files Browse the repository at this point in the history
  • Loading branch information
peetzweg committed Nov 13, 2023
1 parent dc56786 commit 4db3d15
Show file tree
Hide file tree
Showing 30 changed files with 51 additions and 51 deletions.
2 changes: 1 addition & 1 deletion basic-contract-caller/frontend/src/Other.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import otherContractMetadata from './assets/other_contract.json';
import { Card } from 'ui';
import { useCallSubscription, useContract } from 'useink';
import { pickDecoded } from 'useink/utils';
import otherContractMetadata from './assets/other_contract.json';

interface Props {
address: string;
Expand Down
6 changes: 3 additions & 3 deletions basic-contract-caller/frontend/src/main.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import App from './App.tsx';
import './Global.css';
import metadata from './assets/basic_contract_caller.json';
import React from 'react';
import ReactDOM from 'react-dom/client';
import 'ui/style.css';
import { UseInkProvider } from 'useink';
import { RococoContractsTestnet } from 'useink/chains';
import { NotificationsProvider } from 'useink/notifications';
import App from './App.tsx';
import './Global.css';
import metadata from './assets/basic_contract_caller.json';

ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
<React.StrictMode>
Expand Down
2 changes: 1 addition & 1 deletion contract-terminate/frontend/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import metadata from './assets/contract_terminate.json';
import { useEffect, useMemo } from 'react';
import {
Button,
Expand All @@ -17,6 +16,7 @@ import {
planckToDecimalFormatted,
shouldDisable,
} from 'useink/utils';
import metadata from './assets/contract_terminate.json';

// We already deployed the contract Wasm blob on chain. We use this code hash to
// re-deploy;
Expand Down
6 changes: 3 additions & 3 deletions contract-terminate/frontend/src/main.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import App from './App.tsx';
import './Global.css';
import metadata from './assets/contract_terminate.json';
import React from 'react';
import ReactDOM from 'react-dom/client';
import 'ui/style.css';
import { UseInkProvider } from 'useink';
import { RococoContractsTestnet } from 'useink/chains';
import { NotificationsProvider } from 'useink/notifications';
import App from './App.tsx';
import './Global.css';
import metadata from './assets/contract_terminate.json';

ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
<React.StrictMode>
Expand Down
6 changes: 3 additions & 3 deletions contract-transfer/frontend/src/main.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import App from './App.tsx';
import './Global.css';
import metadata from './assets/contract_transfer.json';
import React from 'react';
import ReactDOM from 'react-dom/client';
import 'ui/style.css';
import { UseInkProvider } from 'useink';
import { RococoContractsTestnet } from 'useink/chains';
import { NotificationsProvider } from 'useink/notifications';
import App from './App.tsx';
import './Global.css';
import metadata from './assets/contract_transfer.json';

ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
<React.StrictMode>
Expand Down
2 changes: 1 addition & 1 deletion erc20/frontend/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { DeployerProvider, InkLayout } from 'ui';
import metadata from '../assets/erc20.json';
import { Erc20 } from './components';
import { DeployerProvider, InkLayout } from 'ui';

const ONE_BILLION_TOKENS = '1000000000000000000000';

Expand Down
2 changes: 1 addition & 1 deletion erc20/frontend/src/Other.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import otherContractMetadata from './assets/other_contract.json';
import { Card } from 'ui';
import { useCallSubscription, useContract } from 'useink';
import { pickDecoded } from 'useink/utils';
import otherContractMetadata from './assets/other_contract.json';

interface Props {
address: string;
Expand Down
6 changes: 3 additions & 3 deletions erc20/frontend/src/components/Erc20/Erc20.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
import metadata from '../../../assets/erc20.json';
import { ReadView } from '../ReadView';
import { WriteView } from '../WriteView';
import { useMemo, useState } from 'react';
import { Card, Tab, Tabs, formatContractName, useDeployerState } from 'ui';
import { useCallSubscription, useContract, useTx, useWallet } from 'useink';
Expand All @@ -10,6 +7,9 @@ import {
planckToDecimalFormatted,
stringNumberToBN,
} from 'useink/utils';
import metadata from '../../../assets/erc20.json';
import { ReadView } from '../ReadView';
import { WriteView } from '../WriteView';

export const Erc20: React.FC = () => {
const { contractAddress } = useDeployerState();
Expand Down
6 changes: 3 additions & 3 deletions erc20/frontend/src/main.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import metadata from '../assets/erc20.json';
import App from './App.tsx';
import './Global.css';
import React from 'react';
import ReactDOM from 'react-dom/client';
import 'ui/style.css';
import { UseInkProvider } from 'useink';
import { RococoContractsTestnet } from 'useink/chains';
import { NotificationsProvider } from 'useink/notifications';
import metadata from '../assets/erc20.json';
import App from './App.tsx';
import './Global.css';

ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
<React.StrictMode>
Expand Down
2 changes: 1 addition & 1 deletion erc721/frontend/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { DeployerProvider, InkLayout } from 'ui';
import metadata from '../assets/erc721.json';
import { Erc721 } from './components';
import { DeployerProvider, InkLayout } from 'ui';

function App() {
return (
Expand Down
6 changes: 3 additions & 3 deletions erc721/frontend/src/components/Erc721/Erc721.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import metadata from '../../../assets/erc721.json';
import { ReadView } from '../ReadView';
import { WriteView } from '../WriteView';
import { useState } from 'react';
import { Card, Tab, Tabs, formatContractName, useDeployerState } from 'ui';
import { useCallSubscription, useContract, useTx, useWallet } from 'useink';
import { useTxNotifications } from 'useink/notifications';
import { pickDecoded } from 'useink/utils';
import metadata from '../../../assets/erc721.json';
import { ReadView } from '../ReadView';
import { WriteView } from '../WriteView';

export const Erc721: React.FC = () => {
const { contractAddress } = useDeployerState();
Expand Down
6 changes: 3 additions & 3 deletions erc721/frontend/src/main.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import metadata from '../assets/erc721.json';
import App from './App.tsx';
import './Global.css';
import React from 'react';
import ReactDOM from 'react-dom/client';
import 'ui/style.css';
import { UseInkProvider } from 'useink';
import { RococoContractsTestnet } from 'useink/chains';
import { NotificationsProvider } from 'useink/notifications';
import metadata from '../assets/erc721.json';
import App from './App.tsx';
import './Global.css';

ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
<React.StrictMode>
Expand Down
4 changes: 2 additions & 2 deletions flipper/frontend/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import metadata from './assets/flipper.json';
import { CONTRACT_ROCOCO_ADDRESS } from './constants';
import { Button, Card, ConnectButton, InkLayout, formatContractName } from 'ui';
import { useCallSubscription, useContract, useTx, useWallet } from 'useink';
import { useTxNotifications } from 'useink/notifications';
import { pickDecoded, shouldDisable } from 'useink/utils';
import metadata from './assets/flipper.json';
import { CONTRACT_ROCOCO_ADDRESS } from './constants';

function App() {
const { account } = useWallet();
Expand Down
6 changes: 3 additions & 3 deletions flipper/frontend/src/main.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import App from './App.tsx';
import './Global.css';
import metadata from './assets/flipper.json';
import React from 'react';
import ReactDOM from 'react-dom/client';
import 'ui/style.css';
import { UseInkProvider } from 'useink';
import { RococoContractsTestnet } from 'useink/chains';
import { NotificationsProvider } from 'useink/notifications';
import App from './App.tsx';
import './Global.css';
import metadata from './assets/flipper.json';

ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
<React.StrictMode>
Expand Down
4 changes: 2 additions & 2 deletions incrementer/frontend/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import metadata from './assets/incrementer.json';
import { CONTRACT_ROCOCO_ADDRESS } from './constants';
import { useState } from 'react';
import {
Button,
Expand All @@ -12,6 +10,8 @@ import {
import { useCallSubscription, useContract, useTx, useWallet } from 'useink';
import { useTxNotifications } from 'useink/notifications';
import { pickDecoded, shouldDisable } from 'useink/utils';
import metadata from './assets/incrementer.json';
import { CONTRACT_ROCOCO_ADDRESS } from './constants';

function App() {
const { account } = useWallet();
Expand Down
6 changes: 3 additions & 3 deletions incrementer/frontend/src/main.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import App from './App.tsx';
import './Global.css';
import metadata from './assets/incrementer.json';
import React from 'react';
import ReactDOM from 'react-dom/client';
import 'ui/style.css';
import { UseInkProvider } from 'useink';
import { RococoContractsTestnet } from 'useink/chains';
import { NotificationsProvider } from 'useink/notifications';
import App from './App.tsx';
import './Global.css';
import metadata from './assets/incrementer.json';

ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
<React.StrictMode>
Expand Down
2 changes: 1 addition & 1 deletion ui/src/Accounts/Accounts.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { ClassNameable } from '../types';
import { Listbox, Transition } from '@headlessui/react';
import { CheckIcon, ChevronUpDownIcon } from '@heroicons/react/24/solid';
import classNames from 'classnames';
import React, { Fragment } from 'react';
import { useWallet } from 'useink';
import { ClassNameable } from '../types';

export const Accounts: React.FC<ClassNameable> = ({ className }) => {
const { setAccount, account, accounts } = useWallet();
Expand Down
2 changes: 1 addition & 1 deletion ui/src/BigIntInputField/BigIntInputField.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { InputField } from '..';
import React, { DetailedHTMLProps, InputHTMLAttributes } from 'react';
import { InputField } from '..';

interface Props
extends DetailedHTMLProps<
Expand Down
2 changes: 1 addition & 1 deletion ui/src/Card/Card.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { InkComponent } from '../types';
import classNames from 'classnames';
import React from 'react';
import { InkComponent } from '../types';

export const Card: React.FC<InkComponent> = ({ children, className }) => {
const classes = classNames(
Expand Down
2 changes: 1 addition & 1 deletion ui/src/Events/Events.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { ClassNameable } from '..';
import classNames from 'classnames';
import React from 'react';
import { EventRecord } from 'useink/core';
Expand All @@ -8,6 +7,7 @@ import {
isContractInstantiatedEvent,
isExtrinsicFailedEvent,
} from 'useink/utils';
import { ClassNameable } from '..';

export interface Props extends ClassNameable {
events?: EventRecord[];
Expand Down
4 changes: 2 additions & 2 deletions ui/src/InkLayout/InkLayout.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import classNames from 'classnames';
import React from 'react';
import { InkComponent, Notifications } from '..';
import { LottieEntity } from '../LottieEntity';
import { UIProvider } from '../contexts';
import { Screen } from './Screen';
import { ScreenDarkener } from './ScreenDarkener';
import { Submarine } from './Submarine';
import classNames from 'classnames';
import React from 'react';

type Props = InkComponent & {
animationSrc?: string;
Expand Down
2 changes: 1 addition & 1 deletion ui/src/InkLayout/ScreenDarkener/ScreenDarkener.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useUI } from '../..';
import classNames from 'classnames';
import * as React from 'react';
import { useUI } from '../..';

export const ScreenDarkener: React.FC = () => {
const { showScreen } = useUI();
Expand Down
2 changes: 1 addition & 1 deletion ui/src/InkLayout/Submarine/Submarine.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export const Submarine: React.FC<React.PropsWithChildren> = () => {
}, [setPosition]);

return (
/* rome-ignore lint/a11y/noSvgWithoutTitle: We don't want a tooltip to appear */
/* biome-ignore lint/a11y/noSvgWithoutTitle: We don't want a tooltip to appear */
<svg
xmlns='http://www.w3.org/2000/svg'
viewBox='0 0 1920.01 1830.89'
Expand Down
2 changes: 1 addition & 1 deletion ui/src/Logo/Logo.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ClassNameable } from '../types';
import React from 'react';
import { ClassNameable } from '../types';

export const Logo: React.FC<ClassNameable> = ({ className }) => (
<svg
Expand Down
2 changes: 1 addition & 1 deletion ui/src/LottieEntity/LottieEntity.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ClassNameable } from '..';
import { Player } from '@lottiefiles/react-lottie-player';
import React from 'react';
import { ClassNameable } from '..';

type Props = {
src: string;
Expand Down
2 changes: 1 addition & 1 deletion ui/src/Modal/Modal.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Card } from '../Card';
import classNames from 'classnames';
import React, { PropsWithChildren } from 'react';
import { Card } from '../Card';

type Props = {
open: boolean;
Expand Down
2 changes: 1 addition & 1 deletion ui/src/Notifications/Notifications.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Snackbar } from '../Snackbar';
import React from 'react';
// eslint-disable-next-line import/no-unresolved
import { toNotificationLevel, useNotifications } from 'useink/notifications';
import { Snackbar } from '../Snackbar';

export const Notifications: React.FC = () => {
const { notifications } = useNotifications();
Expand Down
2 changes: 1 addition & 1 deletion ui/src/NumberInput/NumberInput.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { ClassNameable } from '..';
import { MinusIcon, PlusIcon } from '@heroicons/react/24/solid';
import classNames from 'classnames';
import React from 'react';
import { ClassNameable } from '..';

type Props = ClassNameable & {
onChange: (v: number) => void;
Expand Down
2 changes: 1 addition & 1 deletion ui/src/hooks/useUI.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { UIContext, UIState } from '..';
import { useContext } from 'react';
import { UIContext, UIState } from '..';

export const useUI = (): UIState => useContext(UIContext);
2 changes: 1 addition & 1 deletion ui/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import react from '@vitejs/plugin-react';
import path from 'node:path';
import react from '@vitejs/plugin-react';
import { defineConfig } from 'vite';
import dts from 'vite-plugin-dts';

Expand Down

0 comments on commit 4db3d15

Please sign in to comment.