From 92cfe001bfe39fad77545a3a1f4be5a268e0c85c Mon Sep 17 00:00:00 2001 From: Paul Wackerow <54227730+wackerow@users.noreply.github.com> Date: Wed, 18 Sep 2024 20:06:59 -0700 Subject: [PATCH] fix: relocate /ui/Select/* to fix name collision --- src/components/CentralizedExchanges/index.tsx | 2 +- src/components/Layer2/Layer2Onboard.tsx | 2 +- src/components/{ui/__stories__ => Select}/Select.stories.tsx | 5 +++-- src/components/{ui => }/Select/index.tsx | 0 src/components/{ui => }/Select/innerComponents.tsx | 0 src/components/Staking/StakingLaunchpadWidget.tsx | 2 +- src/hooks/useCentralizedExchanges.ts | 2 +- 7 files changed, 7 insertions(+), 6 deletions(-) rename src/components/{ui/__stories__ => Select}/Select.stories.tsx (94%) rename src/components/{ui => }/Select/index.tsx (100%) rename src/components/{ui => }/Select/innerComponents.tsx (100%) diff --git a/src/components/CentralizedExchanges/index.tsx b/src/components/CentralizedExchanges/index.tsx index 4898ddd01ad..64e4444005d 100644 --- a/src/components/CentralizedExchanges/index.tsx +++ b/src/components/CentralizedExchanges/index.tsx @@ -9,7 +9,7 @@ import Emoji from "@/components/Emoji" import InlineLink from "@/components/Link" import OldHeading from "@/components/OldHeading" import Text from "@/components/OldText" -import Select from "@/components/ui/Select" +import Select from "@/components/Select" import { getLocaleTimestamp } from "@/lib/utils/time" diff --git a/src/components/Layer2/Layer2Onboard.tsx b/src/components/Layer2/Layer2Onboard.tsx index e9864e9b492..e9cf30dc26f 100644 --- a/src/components/Layer2/Layer2Onboard.tsx +++ b/src/components/Layer2/Layer2Onboard.tsx @@ -27,7 +27,7 @@ import { ButtonLink } from "../Buttons" import InlineLink from "../Link" import OldHeading from "../OldHeading" import Text from "../OldText" -import Select, { SelectOnChange } from "../ui/Select" +import Select, { SelectOnChange } from "../Select" const Flex50 = (props: ChildOnlyProp) => ( diff --git a/src/components/ui/__stories__/Select.stories.tsx b/src/components/Select/Select.stories.tsx similarity index 94% rename from src/components/ui/__stories__/Select.stories.tsx rename to src/components/Select/Select.stories.tsx index 9feb4d59944..0cef01e51c7 100644 --- a/src/components/ui/__stories__/Select.stories.tsx +++ b/src/components/Select/Select.stories.tsx @@ -1,7 +1,8 @@ import { Meta, StoryObj } from "@storybook/react" -import { HStack } from "../flex" -import { Select } from "../Select" +import { HStack } from "../ui/flex" + +import Select from "./" const meta = { title: "Atoms / Form / Dropdown", diff --git a/src/components/ui/Select/index.tsx b/src/components/Select/index.tsx similarity index 100% rename from src/components/ui/Select/index.tsx rename to src/components/Select/index.tsx diff --git a/src/components/ui/Select/innerComponents.tsx b/src/components/Select/innerComponents.tsx similarity index 100% rename from src/components/ui/Select/innerComponents.tsx rename to src/components/Select/innerComponents.tsx diff --git a/src/components/Staking/StakingLaunchpadWidget.tsx b/src/components/Staking/StakingLaunchpadWidget.tsx index 13c1991bfb2..d2fe3706863 100644 --- a/src/components/Staking/StakingLaunchpadWidget.tsx +++ b/src/components/Staking/StakingLaunchpadWidget.tsx @@ -10,8 +10,8 @@ import Translation from "@/components/Translation" import { cn } from "@/lib/utils/cn" import { trackCustomEvent } from "@/lib/utils/matomo" +import Select, { type SelectOnChange } from "../Select" import { Flex } from "../ui/flex" -import Select, { type SelectOnChange } from "../ui/Select" type StakingDataOption = { label: string; value: string } diff --git a/src/hooks/useCentralizedExchanges.ts b/src/hooks/useCentralizedExchanges.ts index e864dc4b907..c4122926eeb 100644 --- a/src/hooks/useCentralizedExchanges.ts +++ b/src/hooks/useCentralizedExchanges.ts @@ -12,7 +12,7 @@ import { useTranslation } from "next-i18next" // import squarelink from "@/public/images/wallets/squarelink.png" // import trust from "@/public/images/wallets/trust.png" import type { ImageProps } from "@/components/Image" -import { SelectOnChange } from "@/components/ui/Select" +import { SelectOnChange } from "@/components/Select" import { trackCustomEvent } from "@/lib/utils/matomo"