Skip to content

Commit

Permalink
organize imports
Browse files Browse the repository at this point in the history
  • Loading branch information
jordaaash committed Nov 17, 2022
1 parent e9257fd commit 28a853f
Show file tree
Hide file tree
Showing 11 changed files with 30 additions and 30 deletions.
2 changes: 1 addition & 1 deletion packages/core/react/src/ConnectionProvider.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Connection, type ConnectionConfig } from '@solana/web3.js';
import React, { useMemo, type FC, type ReactNode } from 'react';
import React, { type FC, type ReactNode, useMemo } from 'react';
import { ConnectionContext } from './useConnection.js';

export interface ConnectionProviderProps {
Expand Down
2 changes: 1 addition & 1 deletion packages/core/react/src/WalletProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
} from '@solana-mobile/wallet-adapter-mobile';
import { type Adapter, type WalletError, type WalletName } from '@solana/wallet-adapter-base';
import { useStandardWalletAdapters } from '@solana/wallet-standard-wallet-adapter-react';
import React, { useCallback, useEffect, useMemo, useRef, type ReactNode } from 'react';
import React, { type ReactNode, useCallback, useEffect, useMemo, useRef } from 'react';
import getEnvironment, { Environment } from './getEnvironment.js';
import getInferredClusterFromEndpoint from './getInferredClusterFromEndpoint.js';
import { useConnection } from './useConnection.js';
Expand Down
6 changes: 3 additions & 3 deletions packages/core/react/src/WalletProviderBase.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import {
WalletNotConnectedError,
WalletNotReadyError,
WalletReadyState,
type Adapter,
type MessageSignerWalletAdapterProps,
type SignerWalletAdapterProps,
type WalletAdapterProps,
type WalletError,
type WalletName,
WalletNotConnectedError,
WalletNotReadyError,
WalletReadyState,
} from '@solana/wallet-adapter-base';
import { type PublicKey } from '@solana/web3.js';
import React, { type ReactNode, useCallback, useEffect, useMemo, useRef, useState } from 'react';
Expand Down
4 changes: 2 additions & 2 deletions packages/core/react/src/__tests__/WalletProviderBase-test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
'use strict';

import {
type Adapter,
BaseWalletAdapter,
WalletError,
type WalletName,
WalletNotReadyError,
WalletReadyState,
type Adapter,
type WalletName,
} from '@solana/wallet-adapter-base';
import { PublicKey } from '@solana/web3.js';
import React, { createRef, forwardRef, useImperativeHandle } from 'react';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
'use strict';

import {
SolanaMobileWalletAdapter,
type AddressSelector,
type AuthorizationResultCache,
SolanaMobileWalletAdapter,
} from '@solana-mobile/wallet-adapter-mobile';
import { WalletError, WalletReadyState, type Adapter, type WalletName } from '@solana/wallet-adapter-base';
import { type Adapter, WalletError, type WalletName, WalletReadyState } from '@solana/wallet-adapter-base';
import { PublicKey } from '@solana/web3.js';
import 'jest-localstorage-mock';
import React, { createRef, forwardRef, useImperativeHandle } from 'react';
Expand Down
10 changes: 5 additions & 5 deletions packages/core/react/src/__tests__/WalletProviderMobile-test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@
'use strict';

import {
SolanaMobileWalletAdapter,
SolanaMobileWalletAdapterWalletName,
type AddressSelector,
type AuthorizationResultCache,
SolanaMobileWalletAdapter,
SolanaMobileWalletAdapterWalletName,
} from '@solana-mobile/wallet-adapter-mobile';
import {
type Adapter,
BaseWalletAdapter,
WalletError,
WalletReadyState,
type Adapter,
type WalletName,
WalletReadyState,
} from '@solana/wallet-adapter-base';
import { PublicKey, type Connection } from '@solana/web3.js';
import { type Connection, PublicKey } from '@solana/web3.js';
import 'jest-localstorage-mock';
import React, { createRef, forwardRef, useImperativeHandle } from 'react';
import { createRoot } from 'react-dom/client';
Expand Down
2 changes: 1 addition & 1 deletion packages/core/react/src/__tests__/getEnvironment-test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { WalletReadyState, type Adapter } from '@solana/wallet-adapter-base';
import { type Adapter, WalletReadyState } from '@solana/wallet-adapter-base';
import getEnvironment, { Environment } from '../getEnvironment.js';

describe('getEnvironment()', () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/core/react/src/getEnvironment.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { SolanaMobileWalletAdapterWalletName } from '@solana-mobile/wallet-adapter-mobile';
import { WalletReadyState, type Adapter } from '@solana/wallet-adapter-base';
import { type Adapter, WalletReadyState } from '@solana/wallet-adapter-base';

export enum Environment {
DESKTOP_WEB,
Expand Down
2 changes: 1 addition & 1 deletion packages/core/react/src/useLocalStorage.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useEffect, useRef, useState, type Dispatch, type SetStateAction } from 'react';
import { type Dispatch, type SetStateAction, useEffect, useRef, useState } from 'react';

export function useLocalStorage<T>(key: string, defaultState: T): [T, Dispatch<SetStateAction<T>>] {
const state = useState<T>(() => {
Expand Down
10 changes: 5 additions & 5 deletions packages/starter/example/src/pages/_app.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type { AppProps } from 'next/app';
import Head from 'next/head';
import type { FC } from 'react';
import React from 'react';
import { ContextProvider } from '../components/ContextProvider';
import type { AppProps } from "next/app";
import Head from "next/head";
import type { FC } from "react";
import React from "react";
import { ContextProvider } from "../components/ContextProvider";

// Use require instead of import since order matters
require('antd/dist/antd.dark.less');
Expand Down
16 changes: 8 additions & 8 deletions packages/starter/nextjs-starter/src/pages/_app.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { WalletAdapterNetwork } from '@solana/wallet-adapter-base';
import { ConnectionProvider, WalletProvider } from '@solana/wallet-adapter-react';
import { WalletModalProvider } from '@solana/wallet-adapter-react-ui';
import { UnsafeBurnerWalletAdapter } from '@solana/wallet-adapter-wallets';
import { clusterApiUrl } from '@solana/web3.js';
import type { AppProps } from 'next/app';
import type { FC } from 'react';
import React, { useMemo } from 'react';
import { WalletAdapterNetwork } from "@solana/wallet-adapter-base";
import { ConnectionProvider, WalletProvider } from "@solana/wallet-adapter-react";
import { WalletModalProvider } from "@solana/wallet-adapter-react-ui";
import { UnsafeBurnerWalletAdapter } from "@solana/wallet-adapter-wallets";
import { clusterApiUrl } from "@solana/web3.js";
import type { AppProps } from "next/app";
import type { FC } from "react";
import React, { useMemo } from "react";

// Use require instead of import since order matters
require('@solana/wallet-adapter-react-ui/styles.css');
Expand Down

0 comments on commit 28a853f

Please sign in to comment.