Skip to content

Commit 649a156

Browse files
committed
refactor: internalize lodash functions
1 parent 4e12a13 commit 649a156

File tree

49 files changed

+227
-58
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+227
-58
lines changed

.storybook/modes.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import pickBy from "lodash/pickBy"
1+
import { pickBy } from "@/lib/utils/lodash"
22

33
import { baseLocales } from "./next-intl"
44
import { breakpointSet } from "./preview"

app/[locale]/[...slug]/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import pick from "lodash.pick"
21
import { notFound } from "next/navigation"
32
import { getMessages, setRequestLocale } from "next-intl/server"
43

@@ -8,6 +7,7 @@ import mdComponents from "@/components/MdComponents"
87
import { dataLoader } from "@/lib/utils/data/dataLoader"
98
import { dateToString } from "@/lib/utils/date"
109
import { getLayoutFromSlug } from "@/lib/utils/layout"
10+
import { pick } from "@/lib/utils/lodash"
1111
import { getPostSlugs } from "@/lib/utils/md"
1212
import { getRequiredNamespacesForPage } from "@/lib/utils/translations"
1313

app/[locale]/assets/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import pick from "lodash.pick"
21
import {
32
getMessages,
43
getTranslations,
@@ -9,6 +8,7 @@ import { Lang } from "@/lib/types"
98

109
import I18nProvider from "@/components/I18nProvider"
1110

11+
import { pick } from "@/lib/utils/lodash"
1212
import { getMetadata } from "@/lib/utils/metadata"
1313
import { getRequiredNamespacesForPage } from "@/lib/utils/translations"
1414

app/[locale]/bug-bounty/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import pick from "lodash.pick"
21
import {
32
getMessages,
43
getTranslations,
@@ -10,6 +9,7 @@ import type { CommitHistory, Lang, Params } from "@/lib/types"
109
import I18nProvider from "@/components/I18nProvider"
1110

1211
import { getAppPageContributorInfo } from "@/lib/utils/contributors"
12+
import { pick } from "@/lib/utils/lodash"
1313
import { getMetadata } from "@/lib/utils/metadata"
1414
import { getRequiredNamespacesForPage } from "@/lib/utils/translations"
1515

app/[locale]/community/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import pick from "lodash.pick"
21
import {
32
getMessages,
43
getTranslations,
@@ -9,6 +8,7 @@ import { Lang } from "@/lib/types"
98

109
import I18nProvider from "@/components/I18nProvider"
1110

11+
import { pick } from "@/lib/utils/lodash"
1212
import { getMetadata } from "@/lib/utils/metadata"
1313
import { getRequiredNamespacesForPage } from "@/lib/utils/translations"
1414

app/[locale]/contributing/translation-program/acknowledgements/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import pick from "lodash.pick"
21
import {
32
getMessages,
43
getTranslations,
@@ -9,6 +8,7 @@ import { Lang } from "@/lib/types"
98

109
import I18nProvider from "@/components/I18nProvider"
1110

11+
import { pick } from "@/lib/utils/lodash"
1212
import { getMetadata } from "@/lib/utils/metadata"
1313
import { getRequiredNamespacesForPage } from "@/lib/utils/translations"
1414

app/[locale]/contributing/translation-program/contributors/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import pick from "lodash.pick"
21
import {
32
getMessages,
43
getTranslations,
@@ -9,6 +8,7 @@ import { Lang } from "@/lib/types"
98

109
import I18nProvider from "@/components/I18nProvider"
1110

11+
import { pick } from "@/lib/utils/lodash"
1212
import { getMetadata } from "@/lib/utils/metadata"
1313
import { getRequiredNamespacesForPage } from "@/lib/utils/translations"
1414

app/[locale]/dapps/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import pick from "lodash.pick"
21
import {
32
getMessages,
43
getTranslations,
@@ -10,6 +9,7 @@ import type { CommitHistory, Lang, Params } from "@/lib/types"
109
import I18nProvider from "@/components/I18nProvider"
1110

1211
import { getAppPageContributorInfo } from "@/lib/utils/contributors"
12+
import { pick } from "@/lib/utils/lodash"
1313
import { getMetadata } from "@/lib/utils/metadata"
1414
import { getRequiredNamespacesForPage } from "@/lib/utils/translations"
1515

app/[locale]/developers/learning-tools/_components/learning-tools.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
"use client"
22

33
import { BaseHTMLAttributes } from "react"
4-
import shuffle from "lodash/shuffle"
54

65
import { LearningTool } from "@/lib/types"
76

@@ -14,6 +13,7 @@ import Translation from "@/components/Translation"
1413
import { ButtonLink } from "@/components/ui/buttons/Button"
1514

1615
import { cn } from "@/lib/utils/cn"
16+
import { shuffle } from "@/lib/utils/lodash"
1717

1818
import { useTranslation } from "@/hooks/useTranslation"
1919
import AlchemyUniversityImage from "@/public/images/dev-tools/alchemyuniversity.png"

app/[locale]/developers/learning-tools/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import pick from "lodash.pick"
21
import {
32
getMessages,
43
getTranslations,
@@ -9,6 +8,7 @@ import { Lang } from "@/lib/types"
98

109
import I18nProvider from "@/components/I18nProvider"
1110

11+
import { pick } from "@/lib/utils/lodash"
1212
import { getMetadata } from "@/lib/utils/metadata"
1313
import { getRequiredNamespacesForPage } from "@/lib/utils/translations"
1414

0 commit comments

Comments
 (0)