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

Performance: import lodash submodules #12465

Merged
merged 1 commit into from
Mar 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/@chakra-ui/components/Avatar.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { pick } from "lodash"
import pick from "lodash/pick"
import { avatarAnatomy } from "@chakra-ui/anatomy"
import {
createMultiStyleConfigHelpers,
Expand Down
2 changes: 1 addition & 1 deletion src/@chakra-ui/components/components.utils.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { merge } from "lodash"
import merge from "lodash/merge"
import { cssVar, SystemStyleObject, theme } from "@chakra-ui/react"

const {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Contributors.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { shuffle } from "lodash"
import shuffle from "lodash/shuffle"
import { Box, Flex, Image, LinkBox, LinkOverlay } from "@chakra-ui/react"

import InlineLink from "@/components/Link"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { MutableRefObject } from "react"
import { uniqueId } from "lodash"
import uniqueId from "lodash/uniqueId"
import { BsToggleOff, BsToggleOn } from "react-icons/bs"
import {
Accordion,
Expand Down
2 changes: 1 addition & 1 deletion src/components/MeetupList.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useState } from "react"
import { sortBy } from "lodash"
import sortBy from "lodash/sortBy"
import {
Box,
Flex,
Expand Down
2 changes: 0 additions & 2 deletions src/components/Quiz/QuizWidget/QuizSummary.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { useEffect } from "react"
import { merge } from "lodash"
import { useRouter } from "next/router"
import { useTranslation } from "next-i18next"
import {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Quiz/QuizWidget/useQuizWidget.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useEffect, useMemo, useState } from "react"
import { shuffle } from "lodash"
import shuffle from "lodash/shuffle"
import { useTranslation } from "next-i18next"

import type {
Expand Down
2 changes: 1 addition & 1 deletion src/components/RandomAppList.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useEffect, useState } from "react"
import { shuffle } from "lodash"
import shuffle from "lodash/shuffle"

import type { TranslationKey } from "@/lib/types"

Expand Down
2 changes: 1 addition & 1 deletion src/components/Staking/StakingProductsCardGrid.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ComponentType, SVGProps, useEffect, useState } from "react"
import { shuffle } from "lodash"
import shuffle from "lodash/shuffle"
import { useTranslation } from "next-i18next"
import {
Badge,
Expand Down
4 changes: 2 additions & 2 deletions src/components/StatsBoxGrid/GridItem.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { kebabCase } from "lodash"
import kebabCase from "lodash/kebabCase"
import { MdInfoOutline } from "react-icons/md"
import { Area, AreaChart, ResponsiveContainer, XAxis, YAxis } from "recharts"
import { Box, Flex, HStack, Icon, Text, VStack } from "@chakra-ui/react"
import { Box, Flex, Icon, Text } from "@chakra-ui/react"

import type { StatsBoxMetric } from "@/lib/types"

Expand Down
3 changes: 2 additions & 1 deletion src/components/TranslationLeaderboard.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React, { useState } from "react"
import { reverse, sortBy } from "lodash"
import reverse from "lodash/reverse"
import sortBy from "lodash/sortBy"
import { useTranslation } from "next-i18next"
import {
Box,
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/useCentralizedExchanges.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useState } from "react"
import { shuffle } from "lodash"
import shuffle from "lodash/shuffle"
import { useRouter } from "next/router"
import { useTranslation } from "next-i18next"

Expand Down
2 changes: 1 addition & 1 deletion src/pages/developers/learning-tools.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { shuffle } from "lodash"
import shuffle from "lodash/shuffle"
import { GetStaticProps } from "next"
import { useTranslation } from "next-i18next"
import { serverSideTranslations } from "next-i18next/serverSideTranslations"
Expand Down
2 changes: 1 addition & 1 deletion src/pages/layer-2.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { merge } from "lodash"
import merge from "lodash/merge"
import { GetStaticProps } from "next"
import { useTranslation } from "next-i18next"
import { serverSideTranslations } from "next-i18next/serverSideTranslations"
Expand Down
2 changes: 1 addition & 1 deletion src/pages/wallets/find-wallet.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useRef, useState } from "react"
import { shuffle } from "lodash"
import shuffle from "lodash/shuffle"
import { GetStaticProps } from "next"
import { useRouter } from "next/router"
import { SSRConfig, useTranslation } from "next-i18next"
Expand Down
Loading