only use lodash that's needed
This commit is contained in:
parent
44b717ed80
commit
b66f990104
|
@ -20,7 +20,7 @@ import { ProfileIcon, WalletIcon } from './icons'
|
|||
import { useTranslation } from 'next-i18next'
|
||||
import { WalletSelect } from 'components/WalletSelect'
|
||||
import AccountsModal from './AccountsModal'
|
||||
import { uniqBy } from 'lodash'
|
||||
import uniqBy from 'lodash/uniqBy'
|
||||
|
||||
export const handleWalletConnect = (wallet: Wallet) => {
|
||||
if (!wallet) {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { useEffect, useState } from 'react'
|
||||
import { XIcon } from '@heroicons/react/solid'
|
||||
import { Connection } from '@solana/web3.js'
|
||||
import { sumBy } from 'lodash'
|
||||
import sumBy from 'lodash/sumBy'
|
||||
import useInterval from '../hooks/useInterval'
|
||||
import { SECONDS } from '../stores/useMangoStore'
|
||||
import { useTranslation } from 'next-i18next'
|
||||
|
|
|
@ -10,7 +10,8 @@ import { TOKEN_LIST_URL } from '@jup-ag/core'
|
|||
import { PublicKey } from '@solana/web3.js'
|
||||
import useMangoStore from '../stores/useMangoStore'
|
||||
import { connectionSelector } from '../stores/selectors'
|
||||
import { sortBy, sum } from 'lodash'
|
||||
import sortBy from 'lodash/sortBy'
|
||||
import sum from 'lodash/sum'
|
||||
import {
|
||||
CogIcon,
|
||||
ExclamationCircleIcon,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import React, { useRef, useEffect, useState, useMemo } from 'react'
|
||||
import Big from 'big.js'
|
||||
import { isEqual as isEqualLodash } from 'lodash'
|
||||
import isEqualLodash from 'lodash/isEqual'
|
||||
import useInterval from '../hooks/useInterval'
|
||||
import usePrevious from '../hooks/usePrevious'
|
||||
import {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import dynamic from 'next/dynamic'
|
||||
import { Responsive, WidthProvider } from 'react-grid-layout'
|
||||
import { round, max } from 'lodash'
|
||||
import round from 'lodash/round'
|
||||
import max from 'lodash/max'
|
||||
import MobileTradePage from './mobile/MobileTradePage'
|
||||
|
||||
const TVChartContainer = dynamic(
|
||||
|
|
|
@ -9,7 +9,7 @@ import {
|
|||
TrBody,
|
||||
TrHead,
|
||||
} from '../TableElements'
|
||||
import { isEmpty } from 'lodash'
|
||||
import isEmpty from 'lodash/isEmpty'
|
||||
import { useTranslation } from 'next-i18next'
|
||||
import Select from '../Select'
|
||||
import Pagination from '../Pagination'
|
||||
|
|
|
@ -12,7 +12,7 @@ import {
|
|||
TrHead,
|
||||
} from '../TableElements'
|
||||
import { useTranslation } from 'next-i18next'
|
||||
import { isEmpty } from 'lodash'
|
||||
import isEmpty from 'lodash/isEmpty'
|
||||
import usePagination from '../../hooks/usePagination'
|
||||
import { numberCompactFormatter, roundToDecimal } from '../../utils/'
|
||||
import Pagination from '../Pagination'
|
||||
|
|
|
@ -3,7 +3,7 @@ import dayjs from 'dayjs'
|
|||
import useMangoStore from '../../stores/useMangoStore'
|
||||
import { Table, Td, Th, TrBody, TrHead } from '../TableElements'
|
||||
import { useTranslation } from 'next-i18next'
|
||||
import { isEmpty } from 'lodash'
|
||||
import isEmpty from 'lodash/isEmpty'
|
||||
import usePagination from '../../hooks/usePagination'
|
||||
import { numberCompactFormatter } from '../../utils/'
|
||||
import Pagination from '../Pagination'
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { useState, useEffect } from 'react'
|
||||
import { useTheme } from 'next-themes'
|
||||
import { cloneDeep } from 'lodash'
|
||||
import cloneDeep from 'lodash/cloneDeep'
|
||||
import dayjs from 'dayjs'
|
||||
import {
|
||||
AreaChart,
|
||||
|
|
|
@ -7,7 +7,7 @@ import {
|
|||
} from '@blockworks-foundation/mango-client'
|
||||
import useMangoStore from '../stores/useMangoStore'
|
||||
import { i80f48ToPercent } from '../utils/index'
|
||||
import { sumBy } from 'lodash'
|
||||
import sumBy from 'lodash/sumBy'
|
||||
import { I80F48 } from '@blockworks-foundation/mango-client'
|
||||
import useMangoAccount from './useMangoAccount'
|
||||
|
||||
|
|
Loading…
Reference in New Issue