From 9f2e1d7f27907e67c7218bcc020c90849125ae0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Paczy=C5=84ski?= Date: Tue, 5 Dec 2023 15:05:11 +0100 Subject: [PATCH 1/6] Cleanup `questline-data.json` --- src/assets/questline-data.json | 12 ------------ src/shared/constants/realms.ts | 8 +------- src/shared/types/island.ts | 2 -- 3 files changed, 1 insertion(+), 21 deletions(-) diff --git a/src/assets/questline-data.json b/src/assets/questline-data.json index f53c5dd34..c5eac27e7 100644 --- a/src/assets/questline-data.json +++ b/src/assets/questline-data.json @@ -2,8 +2,6 @@ "realms": [ { "realmId": "4", - "questlineName": "Transact on PGN, human!", - "description": "Gitcoin is a community that focuses on incentivizing and supporting open-source development. Gitcoin aims to foster collaboration and sustainability within the open-source ecosystem by providing a marketplace for matching developers with projects and funding opportunities and rewards for their contributions.", "quests": [ { "id": "4_1", @@ -19,8 +17,6 @@ }, { "realmId": "7", - "questlineName": "Use your CyberWallet, collect essence, and mint W3ST", - "description": "Cyberconnect is a Web3 social ecosystem that goes beyond likes and shares. It allows developers to create social applications where users have complete control over their digital identity, content, and connections ", "quests": [ { "id": "7_1", @@ -41,8 +37,6 @@ }, { "realmId": "8", - "questlineName": "Transact on Base", - "description": "Base is a secure, low-cost, builder-friendly Ethereum L2 built to bring the next billion users onchain. Base is incubated within Coinbase and plans to progressively decentralize in the years ahead. The Base Realm believes that decentralization is critical to creating an open, global cryptoeconomy that is accessible to everyone.", "quests": [ { "id": "8_1", @@ -60,8 +54,6 @@ }, { "realmId": "9", - "questlineName": "Transact on Arbitrum---especially on Fluidity", - "description": "Arbitrum DAO is a decentralized autonomous organization (DAO) built on the Ethereum blockchain. At its core, the Arbitrum DAO is a community-driven governance mechanism that allows $ARB token holders to propose and vote on changes to the organization and the technologies it governs.", "quests": [ { "id": "9_1", @@ -77,8 +69,6 @@ }, { "realmId": "19", - "questlineName": "Eat your OATs, unless they're minty NFTs", - "description": "Galxe is the largest web3 credential data network that is helping projects and developers build robust decentralized products. Earn oat, NFTs, and tokens by contributing to your favorite Web3 communities.", "quests": [ { "id": "19_1", @@ -94,8 +84,6 @@ }, { "realmId": "22", - "questlineName": "The bribes must flow, over the FraxFerry and far away", - "description": "Frax Finance is a protocol that issues decentralized stablecoins and the subprotocols to support them, creating a unique self-sufficient DeFi ecosystem", "quests": [ { "id": "22_1", diff --git a/src/shared/constants/realms.ts b/src/shared/constants/realms.ts index 8b6033342..07fb7cc49 100644 --- a/src/shared/constants/realms.ts +++ b/src/shared/constants/realms.ts @@ -18,13 +18,7 @@ export function getQuestlineData(id: string): RealmQuestlineData { ({ realmId }) => realmId === id ) - if (!realmWithQuestline) { - return { - description: "", - questlineName: "", - quests: [], - } - } + if (!realmWithQuestline) return { quests: [] } return realmWithQuestline } diff --git a/src/shared/types/island.ts b/src/shared/types/island.ts index a2b2ef800..7bcbe96d0 100644 --- a/src/shared/types/island.ts +++ b/src/shared/types/island.ts @@ -18,8 +18,6 @@ export type RealmContractData = { // Questline data from JSON file export type RealmQuestlineData = { - description: string - questlineName: string quests: Quest[] } From 5d1e9769c3c3319fb84d88268812f81bfe18f48c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Paczy=C5=84ski?= Date: Tue, 5 Dec 2023 15:40:24 +0100 Subject: [PATCH 2/6] Cleanup `ui` directory --- src/{ui/Island => shared/components}/Gif.tsx | 0 .../components/Placeholder.tsx} | 0 .../RealmDetailsPanel/RealmDetailsRewards.tsx | 2 +- .../RealmLeaderboardPanel/index.tsx | 4 +- .../StakeUnstakeSection.tsx | 4 +- .../{ => Background}/InteractiveIsland.tsx | 12 +-- .../IslandBackground.tsx} | 6 +- .../AttackLine.tsx | 0 src/ui/Island/{ => Details}/Clouds.tsx | 0 src/ui/Island/{ => Details}/NetOverlay.tsx | 2 +- .../NewQuestLabel.tsx | 0 .../NewRealmLabel.tsx | 0 .../RealmPin.tsx | 0 src/ui/Island/Img.tsx | 17 --- .../LeaderboardCurrentUser.tsx | 0 .../LeaderboardItem.tsx | 0 .../LeaderboardList => Leaderboard}/index.tsx | 2 +- .../XpClaim => Modals}/XpClaimModal.tsx | 0 .../Island/RealmDetails/Quests/QuestItem.tsx | 81 -------------- .../RealmDetails/Quests/QuestsDetails.tsx | 102 ------------------ .../RealmDetails/Quests/QuestsRewards.tsx | 56 ---------- src/ui/Island/RealmDetails/Quests/index.tsx | 28 ----- src/ui/Island/{ => Realms}/IslandRealms.tsx | 0 src/ui/Island/{ => Realms}/Realm.tsx | 6 +- .../{Cursor => Reflect}/CursorLabel.tsx | 0 .../index.tsx => Reflect/IslandCursor.tsx} | 0 .../Island/{ => Reflect}/IslandPresence.tsx | 2 +- .../StakeCongratulationsModal.tsx | 0 .../StakingForms => Staking}/StakeForm.tsx | 0 .../Island}/Staking/UnstakeCooldown.tsx | 0 .../StakingForms => Staking}/UnstakeForm.tsx | 2 +- src/ui/Island/index.tsx | 4 +- 32 files changed, 25 insertions(+), 305 deletions(-) rename src/{ui/Island => shared/components}/Gif.tsx (100%) rename src/{ui/Island/RealmDetails/Placeholder/index.tsx => shared/components/Placeholder.tsx} (100%) rename src/ui/Island/{ => Background}/InteractiveIsland.tsx (95%) rename src/ui/Island/{Background.tsx => Background/IslandBackground.tsx} (97%) rename src/ui/Island/{IslandRealmsDetails => Details}/AttackLine.tsx (100%) rename src/ui/Island/{ => Details}/Clouds.tsx (100%) rename src/ui/Island/{ => Details}/NetOverlay.tsx (94%) rename src/ui/Island/{IslandRealmsDetails => Details}/NewQuestLabel.tsx (100%) rename src/ui/Island/{IslandRealmsDetails => Details}/NewRealmLabel.tsx (100%) rename src/ui/Island/{IslandRealmsDetails => Details}/RealmPin.tsx (100%) delete mode 100644 src/ui/Island/Img.tsx rename src/ui/Island/{RealmDetails/LeaderboardList => Leaderboard}/LeaderboardCurrentUser.tsx (100%) rename src/ui/Island/{RealmDetails/LeaderboardList => Leaderboard}/LeaderboardItem.tsx (100%) rename src/ui/Island/{RealmDetails/LeaderboardList => Leaderboard}/index.tsx (93%) rename src/ui/Island/{RealmDetails/XpClaim => Modals}/XpClaimModal.tsx (100%) delete mode 100644 src/ui/Island/RealmDetails/Quests/QuestItem.tsx delete mode 100644 src/ui/Island/RealmDetails/Quests/QuestsDetails.tsx delete mode 100644 src/ui/Island/RealmDetails/Quests/QuestsRewards.tsx delete mode 100644 src/ui/Island/RealmDetails/Quests/index.tsx rename src/ui/Island/{ => Realms}/IslandRealms.tsx (100%) rename src/ui/Island/{ => Realms}/Realm.tsx (98%) rename src/ui/Island/{Cursor => Reflect}/CursorLabel.tsx (100%) rename src/ui/Island/{Cursor/index.tsx => Reflect/IslandCursor.tsx} (100%) rename src/ui/Island/{ => Reflect}/IslandPresence.tsx (93%) rename src/ui/Island/{RealmDetails/StakingForms => Staking}/StakeCongratulationsModal.tsx (100%) rename src/ui/Island/{RealmDetails/StakingForms => Staking}/StakeForm.tsx (100%) rename src/{shared/components => ui/Island}/Staking/UnstakeCooldown.tsx (100%) rename src/ui/Island/{RealmDetails/StakingForms => Staking}/UnstakeForm.tsx (98%) diff --git a/src/ui/Island/Gif.tsx b/src/shared/components/Gif.tsx similarity index 100% rename from src/ui/Island/Gif.tsx rename to src/shared/components/Gif.tsx diff --git a/src/ui/Island/RealmDetails/Placeholder/index.tsx b/src/shared/components/Placeholder.tsx similarity index 100% rename from src/ui/Island/RealmDetails/Placeholder/index.tsx rename to src/shared/components/Placeholder.tsx diff --git a/src/shared/components/RealmPanel/RealmDetailsPanel/RealmDetailsRewards.tsx b/src/shared/components/RealmPanel/RealmDetailsPanel/RealmDetailsRewards.tsx index e856bb01f..d5490d303 100644 --- a/src/shared/components/RealmPanel/RealmDetailsPanel/RealmDetailsRewards.tsx +++ b/src/shared/components/RealmPanel/RealmDetailsPanel/RealmDetailsRewards.tsx @@ -13,7 +13,7 @@ import Tooltip from "shared/components/Tooltip" import { LINKS } from "shared/constants" import { bigIntToDisplayUserAmount } from "shared/utils" import ClaimCongratulations from "ui/Claim/modals/ClaimCongratulations" -import XpClaimModal from "ui/Island/RealmDetails/XpClaim/XpClaimModal" +import XpClaimModal from "ui/Island/Modals/XpClaimModal" function RealmDetailsRewards({ amount, diff --git a/src/shared/components/RealmPanel/RealmLeaderboardPanel/index.tsx b/src/shared/components/RealmPanel/RealmLeaderboardPanel/index.tsx index 026201cd9..bdadcf107 100644 --- a/src/shared/components/RealmPanel/RealmLeaderboardPanel/index.tsx +++ b/src/shared/components/RealmPanel/RealmLeaderboardPanel/index.tsx @@ -1,8 +1,8 @@ import React, { useState } from "react" import Panel from "shared/components/Panel" import TabPanel from "shared/components/TabPanel" -import LeaderboardList from "ui/Island/RealmDetails/LeaderboardList" -import LeaderboardCurrentUser from "ui/Island/RealmDetails/LeaderboardList/LeaderboardCurrentUser" +import LeaderboardList from "ui/Island/Leaderboard" +import LeaderboardCurrentUser from "ui/Island/Leaderboard/LeaderboardCurrentUser" // TODO: remove this when we have more than one leaderboard type const SHOW_LEADERBOARD_SELECTION = false diff --git a/src/shared/components/RealmPanel/RealmPanelAccordion/StakeUnstakeSection.tsx b/src/shared/components/RealmPanel/RealmPanelAccordion/StakeUnstakeSection.tsx index c28a234cc..914ed2142 100644 --- a/src/shared/components/RealmPanel/RealmPanelAccordion/StakeUnstakeSection.tsx +++ b/src/shared/components/RealmPanel/RealmPanelAccordion/StakeUnstakeSection.tsx @@ -8,8 +8,8 @@ import { } from "redux-state" import { TAHO_ADDRESS } from "shared/constants" import TabPanel from "shared/components/TabPanel" -import StakeForm from "ui/Island/RealmDetails/StakingForms/StakeForm" -import UnstakeForm from "ui/Island/RealmDetails/StakingForms/UnstakeForm" +import StakeForm from "ui/Island/Staking/StakeForm" +import UnstakeForm from "ui/Island/Staking/UnstakeForm" import { AccordionOutsideActions } from "shared/components/Accordion" import RealmPanelAccordion from "." diff --git a/src/ui/Island/InteractiveIsland.tsx b/src/ui/Island/Background/InteractiveIsland.tsx similarity index 95% rename from src/ui/Island/InteractiveIsland.tsx rename to src/ui/Island/Background/InteractiveIsland.tsx index 414e0a98e..8ea636a7a 100644 --- a/src/ui/Island/InteractiveIsland.tsx +++ b/src/ui/Island/Background/InteractiveIsland.tsx @@ -21,11 +21,11 @@ import { limitToBounds, } from "shared/utils" import Assistant from "ui/Assistant" -import Background from "./Background" -import Realms from "./IslandRealms" -import RealmPin from "./IslandRealmsDetails/RealmPin" -import Clouds from "./Clouds" -import AttackLine from "./IslandRealmsDetails/AttackLine" +import IslandBackground from "./IslandBackground" +import Realms from "../Realms/IslandRealms" +import RealmPin from "../Details/RealmPin" +import Clouds from "../Details/Clouds" +import AttackLine from "../Details/AttackLine" function InteractiveIsland() { const selectedRealmId = useDappSelector(selectDisplayedRealmId) @@ -198,7 +198,7 @@ function InteractiveIsland() { height={stageBounds.height} > - + diff --git a/src/ui/Island/Background.tsx b/src/ui/Island/Background/IslandBackground.tsx similarity index 97% rename from src/ui/Island/Background.tsx rename to src/ui/Island/Background/IslandBackground.tsx index c5146d979..b0ce87ae5 100644 --- a/src/ui/Island/Background.tsx +++ b/src/ui/Island/Background/IslandBackground.tsx @@ -59,7 +59,11 @@ const getOverlay = (overlay: OverlayType) => { return null } -export default function Background({ overlay }: { overlay: OverlayType }) { +export default function IslandBackground({ + overlay, +}: { + overlay: OverlayType +}) { const [islandImage] = useImage(backgroundImg) // const overlayRef = useRef(null) // const [currentOverlay, setCurrentOverlay] = useState(null) diff --git a/src/ui/Island/IslandRealmsDetails/AttackLine.tsx b/src/ui/Island/Details/AttackLine.tsx similarity index 100% rename from src/ui/Island/IslandRealmsDetails/AttackLine.tsx rename to src/ui/Island/Details/AttackLine.tsx diff --git a/src/ui/Island/Clouds.tsx b/src/ui/Island/Details/Clouds.tsx similarity index 100% rename from src/ui/Island/Clouds.tsx rename to src/ui/Island/Details/Clouds.tsx diff --git a/src/ui/Island/NetOverlay.tsx b/src/ui/Island/Details/NetOverlay.tsx similarity index 94% rename from src/ui/Island/NetOverlay.tsx rename to src/ui/Island/Details/NetOverlay.tsx index b1ebb3637..6b9768e6b 100644 --- a/src/ui/Island/NetOverlay.tsx +++ b/src/ui/Island/Details/NetOverlay.tsx @@ -2,7 +2,7 @@ import React, { memo } from "react" import { Group } from "react-konva" import netGif from "shared/assets/island-overlay-net.gif" import { FIGMA_FACTOR } from "shared/constants" -import Gif from "./Gif" +import Gif from "../../../shared/components/Gif" function NetOverlay() { return ( diff --git a/src/ui/Island/IslandRealmsDetails/NewQuestLabel.tsx b/src/ui/Island/Details/NewQuestLabel.tsx similarity index 100% rename from src/ui/Island/IslandRealmsDetails/NewQuestLabel.tsx rename to src/ui/Island/Details/NewQuestLabel.tsx diff --git a/src/ui/Island/IslandRealmsDetails/NewRealmLabel.tsx b/src/ui/Island/Details/NewRealmLabel.tsx similarity index 100% rename from src/ui/Island/IslandRealmsDetails/NewRealmLabel.tsx rename to src/ui/Island/Details/NewRealmLabel.tsx diff --git a/src/ui/Island/IslandRealmsDetails/RealmPin.tsx b/src/ui/Island/Details/RealmPin.tsx similarity index 100% rename from src/ui/Island/IslandRealmsDetails/RealmPin.tsx rename to src/ui/Island/Details/RealmPin.tsx diff --git a/src/ui/Island/Img.tsx b/src/ui/Island/Img.tsx deleted file mode 100644 index cfbfee260..000000000 --- a/src/ui/Island/Img.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import React from "react" -import { Image } from "react-konva" -import useImage from "use-image" - -type ImgProps = { - src: string - scale?: number - x?: number - y?: number -} - -export default function Img(props: ImgProps) { - const { src, scale = 1, x, y } = props - const [image] = useImage(src) - - return -} diff --git a/src/ui/Island/RealmDetails/LeaderboardList/LeaderboardCurrentUser.tsx b/src/ui/Island/Leaderboard/LeaderboardCurrentUser.tsx similarity index 100% rename from src/ui/Island/RealmDetails/LeaderboardList/LeaderboardCurrentUser.tsx rename to src/ui/Island/Leaderboard/LeaderboardCurrentUser.tsx diff --git a/src/ui/Island/RealmDetails/LeaderboardList/LeaderboardItem.tsx b/src/ui/Island/Leaderboard/LeaderboardItem.tsx similarity index 100% rename from src/ui/Island/RealmDetails/LeaderboardList/LeaderboardItem.tsx rename to src/ui/Island/Leaderboard/LeaderboardItem.tsx diff --git a/src/ui/Island/RealmDetails/LeaderboardList/index.tsx b/src/ui/Island/Leaderboard/index.tsx similarity index 93% rename from src/ui/Island/RealmDetails/LeaderboardList/index.tsx rename to src/ui/Island/Leaderboard/index.tsx index 8cd65cb13..af4e442a6 100644 --- a/src/ui/Island/RealmDetails/LeaderboardList/index.tsx +++ b/src/ui/Island/Leaderboard/index.tsx @@ -7,7 +7,7 @@ import { useDappSelector, } from "redux-state" import LeaderboardItem from "./LeaderboardItem" -import RealmDetailsPlaceholder from "../Placeholder" +import RealmDetailsPlaceholder from "../../../shared/components/Placeholder" const leaderboardDateAvailable = "Nov 30" diff --git a/src/ui/Island/RealmDetails/XpClaim/XpClaimModal.tsx b/src/ui/Island/Modals/XpClaimModal.tsx similarity index 100% rename from src/ui/Island/RealmDetails/XpClaim/XpClaimModal.tsx rename to src/ui/Island/Modals/XpClaimModal.tsx diff --git a/src/ui/Island/RealmDetails/Quests/QuestItem.tsx b/src/ui/Island/RealmDetails/Quests/QuestItem.tsx deleted file mode 100644 index a3b59a61a..000000000 --- a/src/ui/Island/RealmDetails/Quests/QuestItem.tsx +++ /dev/null @@ -1,81 +0,0 @@ -import React, { useCallback } from "react" -import Markdown from "react-markdown" -import Accordion from "shared/components/Accordion" -import starIcon from "shared/assets/icons/star.svg" -import newQuestLabel from "shared/assets/new-quest-label.svg" -import attackLabel from "shared/assets/attack.svg" -import Icon from "shared/components/Icon" -import { Quest } from "shared/types" -import { useDisplayedQuests } from "shared/hooks/quest" -import rehypeExternalLinks from "rehype-external-links" - -export default function QuestItem({ - id, - name, - description, - isNew, - isAttack, -}: Quest) { - const { isQuestDisplayed, updateDisplayedQuest } = useDisplayedQuests() - - const handleQuestClick = useCallback(() => { - if (!isNew) return - updateDisplayedQuest(id) - }, [id, isNew, updateDisplayedQuest]) - - return ( -
- {isNew && !isAttack && !isQuestDisplayed(id) && ( - - )} - {isAttack && ( - - )} - -
- - {description} - -
-
- -
- ) -} diff --git a/src/ui/Island/RealmDetails/Quests/QuestsDetails.tsx b/src/ui/Island/RealmDetails/Quests/QuestsDetails.tsx deleted file mode 100644 index 07c9fa7ee..000000000 --- a/src/ui/Island/RealmDetails/Quests/QuestsDetails.tsx +++ /dev/null @@ -1,102 +0,0 @@ -import React from "react" -import { - selectIsEndOfSeason, - // selectRealmById, - selectSeasonDurationInWeeks, - selectSeasonWeek, - selectWeekEndDate, - selectWeekStartDate, - useDappSelector, -} from "redux-state" -import RealmIcon from "shared/components/RealmIcon" -import { WEEKLY_XP_ALLOCATION } from "shared/constants" -import { formatDate, separateThousandsByComma } from "shared/utils" - -export default function QuestsDetails({ - realmId, - tokenSymbol, -}: { - realmId: string - tokenSymbol: string -}) { - const startDate = useDappSelector(selectWeekStartDate) - const endDate = useDappSelector(selectWeekEndDate) - const seasonWeek = useDappSelector(selectSeasonWeek) - const duration = useDappSelector(selectSeasonDurationInWeeks) - const isEndOfSeason = useDappSelector(selectIsEndOfSeason) - // const realm = useDappSelector((state) => selectRealmById(state, realmId)) - - return ( -
-
-
-
- {!!seasonWeek && ( - <> -
- Total realm rewards Week {seasonWeek} -
- - / {duration} - - - )} -
- {startDate && endDate && !isEndOfSeason && ( -
- {`${formatDate(startDate)} - ${formatDate(endDate)}`} -
- )} -
- -
-

- - {separateThousandsByComma( - /* realm?.xpAllocatable || */ WEEKLY_XP_ALLOCATION, - 0 - )} -

- {tokenSymbol} -
-
- -
- ) -} diff --git a/src/ui/Island/RealmDetails/Quests/QuestsRewards.tsx b/src/ui/Island/RealmDetails/Quests/QuestsRewards.tsx deleted file mode 100644 index 06a1cdace..000000000 --- a/src/ui/Island/RealmDetails/Quests/QuestsRewards.tsx +++ /dev/null @@ -1,56 +0,0 @@ -import React from "react" -import Icon from "shared/components/Icon" -import contactsIcon from "shared/assets/icons/m/contacts.svg" -import { LINKS } from "shared/constants" -import { Quest } from "shared/types" -import QuestItem from "./QuestItem" - -export default function QuestsRewards({ quests }: { quests: Quest[] }) { - return ( -
-

- Weekly Quests - -

-
- {quests.map(({ id, name, description, isNew, isAttack }) => ( - - ))} -
- -
- ) -} diff --git a/src/ui/Island/RealmDetails/Quests/index.tsx b/src/ui/Island/RealmDetails/Quests/index.tsx deleted file mode 100644 index 6ee8ca105..000000000 --- a/src/ui/Island/RealmDetails/Quests/index.tsx +++ /dev/null @@ -1,28 +0,0 @@ -import React from "react" -import { - selectDisplayedRealmId, - selectRealmById, - useDappSelector, -} from "redux-state" -import QuestsDetails from "./QuestsDetails" -import QuestsRewards from "./QuestsRewards" - -export default function Quests() { - const realmId = useDappSelector(selectDisplayedRealmId) - const realm = useDappSelector((state) => selectRealmById(state, realmId)) - - if (!realmId || !realm) return null - - return ( -
- - - -
- ) -} diff --git a/src/ui/Island/IslandRealms.tsx b/src/ui/Island/Realms/IslandRealms.tsx similarity index 100% rename from src/ui/Island/IslandRealms.tsx rename to src/ui/Island/Realms/IslandRealms.tsx diff --git a/src/ui/Island/Realm.tsx b/src/ui/Island/Realms/Realm.tsx similarity index 98% rename from src/ui/Island/Realm.tsx rename to src/ui/Island/Realms/Realm.tsx index 0b6e404db..3d37c65b9 100644 --- a/src/ui/Island/Realm.tsx +++ b/src/ui/Island/Realms/Realm.tsx @@ -22,9 +22,9 @@ import { useIslandContext, useIslandRealmsPaths, usePopulationBubble, -} from "../../shared/hooks" -import NewRealmLabel from "./IslandRealmsDetails/NewRealmLabel" -import NewQuestLabel from "./IslandRealmsDetails/NewQuestLabel" +} from "../../../shared/hooks" +import NewRealmLabel from "../Details/NewRealmLabel" +import NewQuestLabel from "../Details/NewQuestLabel" type RealmProps = { id: string diff --git a/src/ui/Island/Cursor/CursorLabel.tsx b/src/ui/Island/Reflect/CursorLabel.tsx similarity index 100% rename from src/ui/Island/Cursor/CursorLabel.tsx rename to src/ui/Island/Reflect/CursorLabel.tsx diff --git a/src/ui/Island/Cursor/index.tsx b/src/ui/Island/Reflect/IslandCursor.tsx similarity index 100% rename from src/ui/Island/Cursor/index.tsx rename to src/ui/Island/Reflect/IslandCursor.tsx diff --git a/src/ui/Island/IslandPresence.tsx b/src/ui/Island/Reflect/IslandPresence.tsx similarity index 93% rename from src/ui/Island/IslandPresence.tsx rename to src/ui/Island/Reflect/IslandPresence.tsx index 85858ca37..62d836d4e 100644 --- a/src/ui/Island/IslandPresence.tsx +++ b/src/ui/Island/Reflect/IslandPresence.tsx @@ -1,6 +1,6 @@ import React from "react" import { useReflectCursors } from "shared/hooks" -import IslandCursor from "./Cursor" +import IslandCursor from "./IslandCursor" export default function IslandPresence() { const { visibleCursors, currentUser } = useReflectCursors() diff --git a/src/ui/Island/RealmDetails/StakingForms/StakeCongratulationsModal.tsx b/src/ui/Island/Staking/StakeCongratulationsModal.tsx similarity index 100% rename from src/ui/Island/RealmDetails/StakingForms/StakeCongratulationsModal.tsx rename to src/ui/Island/Staking/StakeCongratulationsModal.tsx diff --git a/src/ui/Island/RealmDetails/StakingForms/StakeForm.tsx b/src/ui/Island/Staking/StakeForm.tsx similarity index 100% rename from src/ui/Island/RealmDetails/StakingForms/StakeForm.tsx rename to src/ui/Island/Staking/StakeForm.tsx diff --git a/src/shared/components/Staking/UnstakeCooldown.tsx b/src/ui/Island/Staking/UnstakeCooldown.tsx similarity index 100% rename from src/shared/components/Staking/UnstakeCooldown.tsx rename to src/ui/Island/Staking/UnstakeCooldown.tsx diff --git a/src/ui/Island/RealmDetails/StakingForms/UnstakeForm.tsx b/src/ui/Island/Staking/UnstakeForm.tsx similarity index 98% rename from src/ui/Island/RealmDetails/StakingForms/UnstakeForm.tsx rename to src/ui/Island/Staking/UnstakeForm.tsx index ef34446d1..fbbbb61db 100644 --- a/src/ui/Island/RealmDetails/StakingForms/UnstakeForm.tsx +++ b/src/ui/Island/Staking/UnstakeForm.tsx @@ -15,7 +15,7 @@ import { } from "redux-state" import { isValidInputAmount } from "shared/utils" import classNames from "classnames" -import UnstakeCooldown from "shared/components/Staking/UnstakeCooldown" +import UnstakeCooldown from "ui/Island/Staking/UnstakeCooldown" import { TransactionProgressStatus } from "shared/types" import TransactionProgress from "shared/components/Transactions/TransactionProgress" import ModalLeavingRealm from "ui/Island/Modals/ModalLeavingRealm" diff --git a/src/ui/Island/index.tsx b/src/ui/Island/index.tsx index 217fdf9b5..a1e424059 100644 --- a/src/ui/Island/index.tsx +++ b/src/ui/Island/index.tsx @@ -18,8 +18,8 @@ import FullPageLoader from "shared/components/FullPageLoader" import { usePostHog } from "posthog-js/react" import RealmPanel from "shared/components/RealmPanel" import { REALM_PANEL_ANIMATION_TIME } from "shared/constants" -import InteractiveIsland from "./InteractiveIsland" -import IslandPresence from "./IslandPresence" +import InteractiveIsland from "./Background/InteractiveIsland" +import IslandPresence from "./Reflect/IslandPresence" function IslandWrapper() { const assetsLoaded = useAssets([backgroundImg]) From 5d4692e5f9d69bbcfb68ee6ccd9ce47f21a3253f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Paczy=C5=84ski?= Date: Wed, 6 Dec 2023 12:14:15 +0100 Subject: [PATCH 3/6] Move `RealmPanel` to `ui` directory --- src/shared/components/{ => Loaders}/FullPageLoader.tsx | 4 ++-- .../components/{Modals => Modal}/ClickableModalOverlay.tsx | 0 src/shared/components/{Modal.tsx => Modal/index.tsx} | 6 +++--- src/ui/Claim/modals/ClaimCongratulations.tsx | 2 +- src/ui/DApps/IslandView.tsx | 2 +- .../Island}/Modals/CongratulationsModal.tsx | 4 ++-- .../components => ui/Island}/Modals/OnboardingModal.tsx | 4 ++-- .../RealmDetailsPanel/RealmDetailsChallengeInfo.tsx | 0 .../RealmDetailsPanel/RealmDetailsChallengeItem.tsx | 0 .../RealmPanel/RealmDetailsPanel/RealmDetailsChallenges.tsx | 0 .../RealmPanel/RealmDetailsPanel/RealmDetailsContent.tsx | 0 .../RealmPanel/RealmDetailsPanel/RealmDetailsHeader.tsx | 0 .../RealmPanel/RealmDetailsPanel/RealmDetailsJoin.tsx | 0 .../RealmPanel/RealmDetailsPanel/RealmDetailsRewards.tsx | 0 .../RealmPanel/RealmDetailsPanel/RealmDetailsSection.tsx | 0 .../RealmPanel/RealmDetailsPanel/RealmDetailsStaked.tsx | 0 .../Island}/RealmPanel/RealmDetailsPanel/index.tsx | 0 .../Island}/RealmPanel/RealmLeaderboardPanel/index.tsx | 0 .../RealmPanel/RealmPanelAccordion/GuardiansSection.tsx | 0 .../RealmPanel/RealmPanelAccordion/StakeUnstakeSection.tsx | 0 .../Island}/RealmPanel/RealmPanelAccordion/index.tsx | 0 .../Island}/RealmPanel/RealmPanelCloseButton.tsx | 2 +- .../Island}/RealmPanel/RealmPanelCountdown.tsx | 0 src/{shared/components => ui/Island}/RealmPanel/index.tsx | 2 +- src/ui/Island/Staking/StakeCongratulationsModal.tsx | 2 +- src/ui/Island/index.tsx | 4 ++-- src/ui/Onboarding/ConnectWallet.tsx | 2 +- src/ui/Onboarding/EnterPortal.tsx | 2 +- src/ui/Onboarding/JoinWaitlist.tsx | 2 +- src/ui/Onboarding/Loader.tsx | 2 +- src/ui/Onboarding/index.tsx | 2 +- 31 files changed, 21 insertions(+), 21 deletions(-) rename src/shared/components/{ => Loaders}/FullPageLoader.tsx (92%) rename src/shared/components/{Modals => Modal}/ClickableModalOverlay.tsx (100%) rename src/shared/components/{Modal.tsx => Modal/index.tsx} (98%) rename src/{shared/components => ui/Island}/Modals/CongratulationsModal.tsx (94%) rename src/{shared/components => ui/Island}/Modals/OnboardingModal.tsx (92%) rename src/{shared/components => ui/Island}/RealmPanel/RealmDetailsPanel/RealmDetailsChallengeInfo.tsx (100%) rename src/{shared/components => ui/Island}/RealmPanel/RealmDetailsPanel/RealmDetailsChallengeItem.tsx (100%) rename src/{shared/components => ui/Island}/RealmPanel/RealmDetailsPanel/RealmDetailsChallenges.tsx (100%) rename src/{shared/components => ui/Island}/RealmPanel/RealmDetailsPanel/RealmDetailsContent.tsx (100%) rename src/{shared/components => ui/Island}/RealmPanel/RealmDetailsPanel/RealmDetailsHeader.tsx (100%) rename src/{shared/components => ui/Island}/RealmPanel/RealmDetailsPanel/RealmDetailsJoin.tsx (100%) rename src/{shared/components => ui/Island}/RealmPanel/RealmDetailsPanel/RealmDetailsRewards.tsx (100%) rename src/{shared/components => ui/Island}/RealmPanel/RealmDetailsPanel/RealmDetailsSection.tsx (100%) rename src/{shared/components => ui/Island}/RealmPanel/RealmDetailsPanel/RealmDetailsStaked.tsx (100%) rename src/{shared/components => ui/Island}/RealmPanel/RealmDetailsPanel/index.tsx (100%) rename src/{shared/components => ui/Island}/RealmPanel/RealmLeaderboardPanel/index.tsx (100%) rename src/{shared/components => ui/Island}/RealmPanel/RealmPanelAccordion/GuardiansSection.tsx (100%) rename src/{shared/components => ui/Island}/RealmPanel/RealmPanelAccordion/StakeUnstakeSection.tsx (100%) rename src/{shared/components => ui/Island}/RealmPanel/RealmPanelAccordion/index.tsx (100%) rename src/{shared/components => ui/Island}/RealmPanel/RealmPanelCloseButton.tsx (92%) rename src/{shared/components => ui/Island}/RealmPanel/RealmPanelCountdown.tsx (100%) rename src/{shared/components => ui/Island}/RealmPanel/index.tsx (95%) diff --git a/src/shared/components/FullPageLoader.tsx b/src/shared/components/Loaders/FullPageLoader.tsx similarity index 92% rename from src/shared/components/FullPageLoader.tsx rename to src/shared/components/Loaders/FullPageLoader.tsx index 0b7d7b321..39b902544 100644 --- a/src/shared/components/FullPageLoader.tsx +++ b/src/shared/components/Loaders/FullPageLoader.tsx @@ -1,8 +1,8 @@ import React from "react" import { useVisibilityTransition } from "shared/hooks" import { animated } from "@react-spring/web" -import GoldenCircleSpinner from "./Loaders/GoldenCircleSpinner" -import LoadingText from "./Loaders/LoadingText" +import GoldenCircleSpinner from "./GoldenCircleSpinner" +import LoadingText from "./LoadingText" export default function FullPageLoader({ loaded }: { loaded: boolean }) { const transition = useVisibilityTransition(!loaded) diff --git a/src/shared/components/Modals/ClickableModalOverlay.tsx b/src/shared/components/Modal/ClickableModalOverlay.tsx similarity index 100% rename from src/shared/components/Modals/ClickableModalOverlay.tsx rename to src/shared/components/Modal/ClickableModalOverlay.tsx diff --git a/src/shared/components/Modal.tsx b/src/shared/components/Modal/index.tsx similarity index 98% rename from src/shared/components/Modal.tsx rename to src/shared/components/Modal/index.tsx index 069541d1b..3fa22f063 100644 --- a/src/shared/components/Modal.tsx +++ b/src/shared/components/Modal/index.tsx @@ -2,9 +2,9 @@ import classNames from "classnames" import React, { CSSProperties } from "react" import { easings, useSpring, animated } from "@react-spring/web" -import Portal from "./Portal" -import { noop } from "../utils" -import ClickableModalOverlay from "./Modals/ClickableModalOverlay" +import Portal from "../Portal" +import { noop } from "../../utils" +import ClickableModalOverlay from "./ClickableModalOverlay" function CloseBtn({ onClick, style }: React.SVGProps) { return ( diff --git a/src/ui/Claim/modals/ClaimCongratulations.tsx b/src/ui/Claim/modals/ClaimCongratulations.tsx index 6eebd427a..b64a565b8 100644 --- a/src/ui/Claim/modals/ClaimCongratulations.tsx +++ b/src/ui/Claim/modals/ClaimCongratulations.tsx @@ -1,7 +1,7 @@ import React from "react" import { selectRealmById, useDappSelector } from "redux-state" import Button from "shared/components/Button" -import CongratulationsModal from "shared/components/Modals/CongratulationsModal" +import CongratulationsModal from "ui/Island/Modals/CongratulationsModal" import RealmIcon from "shared/components/RealmIcon" type ClaimCongratulationsProps = { diff --git a/src/ui/DApps/IslandView.tsx b/src/ui/DApps/IslandView.tsx index fdca58fb3..528e520c2 100644 --- a/src/ui/DApps/IslandView.tsx +++ b/src/ui/DApps/IslandView.tsx @@ -14,7 +14,7 @@ import { selectIslandMode, useDappSelector, } from "redux-state" -import FullPageLoader from "shared/components/FullPageLoader" +import FullPageLoader from "shared/components/Loaders/FullPageLoader" import { Route, Switch } from "react-router-dom" import { useDisplayedPopulation } from "shared/hooks" diff --git a/src/shared/components/Modals/CongratulationsModal.tsx b/src/ui/Island/Modals/CongratulationsModal.tsx similarity index 94% rename from src/shared/components/Modals/CongratulationsModal.tsx rename to src/ui/Island/Modals/CongratulationsModal.tsx index 5b89448b5..910c84d6c 100644 --- a/src/shared/components/Modals/CongratulationsModal.tsx +++ b/src/ui/Island/Modals/CongratulationsModal.tsx @@ -1,6 +1,6 @@ import React, { ReactElement, ReactNode } from "react" -import Modal from "../Modal" -import Button from "../Button" +import Modal from "../../../shared/components/Modal" +import Button from "../../../shared/components/Button" type CongratulationsModalProps = { children: string | ReactNode diff --git a/src/shared/components/Modals/OnboardingModal.tsx b/src/ui/Island/Modals/OnboardingModal.tsx similarity index 92% rename from src/shared/components/Modals/OnboardingModal.tsx rename to src/ui/Island/Modals/OnboardingModal.tsx index 001e8c163..b3679cbe5 100644 --- a/src/shared/components/Modals/OnboardingModal.tsx +++ b/src/ui/Island/Modals/OnboardingModal.tsx @@ -1,6 +1,6 @@ import React, { ReactNode } from "react" -import Modal from "../Modal" -import Button from "../Button" +import Modal from "../../../shared/components/Modal" +import Button from "../../../shared/components/Button" type OnboardingModalProps = { children: ReactNode diff --git a/src/shared/components/RealmPanel/RealmDetailsPanel/RealmDetailsChallengeInfo.tsx b/src/ui/Island/RealmPanel/RealmDetailsPanel/RealmDetailsChallengeInfo.tsx similarity index 100% rename from src/shared/components/RealmPanel/RealmDetailsPanel/RealmDetailsChallengeInfo.tsx rename to src/ui/Island/RealmPanel/RealmDetailsPanel/RealmDetailsChallengeInfo.tsx diff --git a/src/shared/components/RealmPanel/RealmDetailsPanel/RealmDetailsChallengeItem.tsx b/src/ui/Island/RealmPanel/RealmDetailsPanel/RealmDetailsChallengeItem.tsx similarity index 100% rename from src/shared/components/RealmPanel/RealmDetailsPanel/RealmDetailsChallengeItem.tsx rename to src/ui/Island/RealmPanel/RealmDetailsPanel/RealmDetailsChallengeItem.tsx diff --git a/src/shared/components/RealmPanel/RealmDetailsPanel/RealmDetailsChallenges.tsx b/src/ui/Island/RealmPanel/RealmDetailsPanel/RealmDetailsChallenges.tsx similarity index 100% rename from src/shared/components/RealmPanel/RealmDetailsPanel/RealmDetailsChallenges.tsx rename to src/ui/Island/RealmPanel/RealmDetailsPanel/RealmDetailsChallenges.tsx diff --git a/src/shared/components/RealmPanel/RealmDetailsPanel/RealmDetailsContent.tsx b/src/ui/Island/RealmPanel/RealmDetailsPanel/RealmDetailsContent.tsx similarity index 100% rename from src/shared/components/RealmPanel/RealmDetailsPanel/RealmDetailsContent.tsx rename to src/ui/Island/RealmPanel/RealmDetailsPanel/RealmDetailsContent.tsx diff --git a/src/shared/components/RealmPanel/RealmDetailsPanel/RealmDetailsHeader.tsx b/src/ui/Island/RealmPanel/RealmDetailsPanel/RealmDetailsHeader.tsx similarity index 100% rename from src/shared/components/RealmPanel/RealmDetailsPanel/RealmDetailsHeader.tsx rename to src/ui/Island/RealmPanel/RealmDetailsPanel/RealmDetailsHeader.tsx diff --git a/src/shared/components/RealmPanel/RealmDetailsPanel/RealmDetailsJoin.tsx b/src/ui/Island/RealmPanel/RealmDetailsPanel/RealmDetailsJoin.tsx similarity index 100% rename from src/shared/components/RealmPanel/RealmDetailsPanel/RealmDetailsJoin.tsx rename to src/ui/Island/RealmPanel/RealmDetailsPanel/RealmDetailsJoin.tsx diff --git a/src/shared/components/RealmPanel/RealmDetailsPanel/RealmDetailsRewards.tsx b/src/ui/Island/RealmPanel/RealmDetailsPanel/RealmDetailsRewards.tsx similarity index 100% rename from src/shared/components/RealmPanel/RealmDetailsPanel/RealmDetailsRewards.tsx rename to src/ui/Island/RealmPanel/RealmDetailsPanel/RealmDetailsRewards.tsx diff --git a/src/shared/components/RealmPanel/RealmDetailsPanel/RealmDetailsSection.tsx b/src/ui/Island/RealmPanel/RealmDetailsPanel/RealmDetailsSection.tsx similarity index 100% rename from src/shared/components/RealmPanel/RealmDetailsPanel/RealmDetailsSection.tsx rename to src/ui/Island/RealmPanel/RealmDetailsPanel/RealmDetailsSection.tsx diff --git a/src/shared/components/RealmPanel/RealmDetailsPanel/RealmDetailsStaked.tsx b/src/ui/Island/RealmPanel/RealmDetailsPanel/RealmDetailsStaked.tsx similarity index 100% rename from src/shared/components/RealmPanel/RealmDetailsPanel/RealmDetailsStaked.tsx rename to src/ui/Island/RealmPanel/RealmDetailsPanel/RealmDetailsStaked.tsx diff --git a/src/shared/components/RealmPanel/RealmDetailsPanel/index.tsx b/src/ui/Island/RealmPanel/RealmDetailsPanel/index.tsx similarity index 100% rename from src/shared/components/RealmPanel/RealmDetailsPanel/index.tsx rename to src/ui/Island/RealmPanel/RealmDetailsPanel/index.tsx diff --git a/src/shared/components/RealmPanel/RealmLeaderboardPanel/index.tsx b/src/ui/Island/RealmPanel/RealmLeaderboardPanel/index.tsx similarity index 100% rename from src/shared/components/RealmPanel/RealmLeaderboardPanel/index.tsx rename to src/ui/Island/RealmPanel/RealmLeaderboardPanel/index.tsx diff --git a/src/shared/components/RealmPanel/RealmPanelAccordion/GuardiansSection.tsx b/src/ui/Island/RealmPanel/RealmPanelAccordion/GuardiansSection.tsx similarity index 100% rename from src/shared/components/RealmPanel/RealmPanelAccordion/GuardiansSection.tsx rename to src/ui/Island/RealmPanel/RealmPanelAccordion/GuardiansSection.tsx diff --git a/src/shared/components/RealmPanel/RealmPanelAccordion/StakeUnstakeSection.tsx b/src/ui/Island/RealmPanel/RealmPanelAccordion/StakeUnstakeSection.tsx similarity index 100% rename from src/shared/components/RealmPanel/RealmPanelAccordion/StakeUnstakeSection.tsx rename to src/ui/Island/RealmPanel/RealmPanelAccordion/StakeUnstakeSection.tsx diff --git a/src/shared/components/RealmPanel/RealmPanelAccordion/index.tsx b/src/ui/Island/RealmPanel/RealmPanelAccordion/index.tsx similarity index 100% rename from src/shared/components/RealmPanel/RealmPanelAccordion/index.tsx rename to src/ui/Island/RealmPanel/RealmPanelAccordion/index.tsx diff --git a/src/shared/components/RealmPanel/RealmPanelCloseButton.tsx b/src/ui/Island/RealmPanel/RealmPanelCloseButton.tsx similarity index 92% rename from src/shared/components/RealmPanel/RealmPanelCloseButton.tsx rename to src/ui/Island/RealmPanel/RealmPanelCloseButton.tsx index a47ca31da..1ab1987c1 100644 --- a/src/shared/components/RealmPanel/RealmPanelCloseButton.tsx +++ b/src/ui/Island/RealmPanel/RealmPanelCloseButton.tsx @@ -2,7 +2,7 @@ import React from "react" import closeIcon from "shared/assets/icons/s/close-black.svg" import { animated } from "@react-spring/web" import { useRealmCloseButtonTransition } from "shared/hooks" -import Button from "../Button" +import Button from "../../../shared/components/Button" export default function RealmPanelCloseButton({ onClose, diff --git a/src/shared/components/RealmPanel/RealmPanelCountdown.tsx b/src/ui/Island/RealmPanel/RealmPanelCountdown.tsx similarity index 100% rename from src/shared/components/RealmPanel/RealmPanelCountdown.tsx rename to src/ui/Island/RealmPanel/RealmPanelCountdown.tsx diff --git a/src/shared/components/RealmPanel/index.tsx b/src/ui/Island/RealmPanel/index.tsx similarity index 95% rename from src/shared/components/RealmPanel/index.tsx rename to src/ui/Island/RealmPanel/index.tsx index 4193815f3..ba6e7978b 100644 --- a/src/shared/components/RealmPanel/index.tsx +++ b/src/ui/Island/RealmPanel/index.tsx @@ -9,7 +9,7 @@ import RealmDetailsPanel from "./RealmDetailsPanel" import RealmLeaderboardPanel from "./RealmLeaderboardPanel" import RealmPanelCountdown from "./RealmPanelCountdown" import RealmPanelCloseButton from "./RealmPanelCloseButton" -import Panel from "../Panel" +import Panel from "../../../shared/components/Panel" export default function RealmPanel({ onClose }: { onClose: () => void }) { const { updateAssistant } = useAssistant() diff --git a/src/ui/Island/Staking/StakeCongratulationsModal.tsx b/src/ui/Island/Staking/StakeCongratulationsModal.tsx index c6cccae2e..b7b10f33a 100644 --- a/src/ui/Island/Staking/StakeCongratulationsModal.tsx +++ b/src/ui/Island/Staking/StakeCongratulationsModal.tsx @@ -5,7 +5,7 @@ import { selectDisplayedRealmId, } from "redux-state" import Button from "shared/components/Button" -import CongratulationsModal from "shared/components/Modals/CongratulationsModal" +import CongratulationsModal from "ui/Island/Modals/CongratulationsModal" import { RealmCutout } from "shared/components/RealmCutout" type StakeCongratulationsModalProps = { diff --git a/src/ui/Island/index.tsx b/src/ui/Island/index.tsx index a1e424059..0aa33ed01 100644 --- a/src/ui/Island/index.tsx +++ b/src/ui/Island/index.tsx @@ -14,9 +14,9 @@ import { useDappDispatch, useDappSelector, } from "redux-state" -import FullPageLoader from "shared/components/FullPageLoader" +import FullPageLoader from "shared/components/Loaders/FullPageLoader" import { usePostHog } from "posthog-js/react" -import RealmPanel from "shared/components/RealmPanel" +import RealmPanel from "ui/Island/RealmPanel" import { REALM_PANEL_ANIMATION_TIME } from "shared/constants" import InteractiveIsland from "./Background/InteractiveIsland" import IslandPresence from "./Reflect/IslandPresence" diff --git a/src/ui/Onboarding/ConnectWallet.tsx b/src/ui/Onboarding/ConnectWallet.tsx index e79331ec9..3e6c74409 100644 --- a/src/ui/Onboarding/ConnectWallet.tsx +++ b/src/ui/Onboarding/ConnectWallet.tsx @@ -1,5 +1,5 @@ import React from "react" -import OnboardingModal from "shared/components/Modals/OnboardingModal" +import OnboardingModal from "ui/Island/Modals/OnboardingModal" import { useConnect } from "shared/hooks" export default function ConnectWallet() { diff --git a/src/ui/Onboarding/EnterPortal.tsx b/src/ui/Onboarding/EnterPortal.tsx index baea0e0ee..659087a1a 100644 --- a/src/ui/Onboarding/EnterPortal.tsx +++ b/src/ui/Onboarding/EnterPortal.tsx @@ -1,5 +1,5 @@ import React, { useCallback } from "react" -import OnboardingModal from "shared/components/Modals/OnboardingModal" +import OnboardingModal from "ui/Island/Modals/OnboardingModal" import { useWalletOnboarding } from "shared/hooks" import { selectWalletAddress, diff --git a/src/ui/Onboarding/JoinWaitlist.tsx b/src/ui/Onboarding/JoinWaitlist.tsx index 20af0c8d5..fe4c0ea5e 100644 --- a/src/ui/Onboarding/JoinWaitlist.tsx +++ b/src/ui/Onboarding/JoinWaitlist.tsx @@ -1,5 +1,5 @@ import React from "react" -import OnboardingModal from "shared/components/Modals/OnboardingModal" +import OnboardingModal from "ui/Island/Modals/OnboardingModal" import Icon from "shared/components/Icon" import newTab from "shared/assets/icons/m/new-tab.svg" import { LINKS } from "shared/constants" diff --git a/src/ui/Onboarding/Loader.tsx b/src/ui/Onboarding/Loader.tsx index e9267a181..b43e649b9 100644 --- a/src/ui/Onboarding/Loader.tsx +++ b/src/ui/Onboarding/Loader.tsx @@ -1,7 +1,7 @@ import React from "react" import GoldenCircleSpinner from "shared/components/Loaders/GoldenCircleSpinner" import LoadingText from "shared/components/Loaders/LoadingText" -import OnboardingModal from "shared/components/Modals/OnboardingModal" +import OnboardingModal from "ui/Island/Modals/OnboardingModal" export default function OnboardingModalLoader() { return ( diff --git a/src/ui/Onboarding/index.tsx b/src/ui/Onboarding/index.tsx index bd0ad1a74..d7eebf3ba 100644 --- a/src/ui/Onboarding/index.tsx +++ b/src/ui/Onboarding/index.tsx @@ -5,7 +5,7 @@ import { selectHasRelevantTokens, selectHasLoadedBalances, } from "redux-state" -import FullPageLoader from "shared/components/FullPageLoader" +import FullPageLoader from "shared/components/Loaders/FullPageLoader" import Nav from "ui/Nav" import portalBackground from "shared/assets/portal-background.mp4" import Version from "shared/components/Version" From 23485dca8d462b6b0cd0ca475747e776d757c64c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Paczy=C5=84ski?= Date: Thu, 7 Dec 2023 09:21:51 +0100 Subject: [PATCH 4/6] Refactor `components` directory --- src/shared/components/{ => DOMElements}/Accordion.tsx | 4 ++-- src/shared/components/{ => DOMElements}/Button.tsx | 0 src/shared/components/{ => DOMElements}/Input.tsx | 0 src/shared/components/{ => DOMElements}/Link.tsx | 0 src/shared/components/{ => DOMElements}/Portal.tsx | 0 src/shared/components/{ => DOMElements}/TabPanel.tsx | 0 .../components/{ => DOMElements}/TokenAmountInput.tsx | 0 src/shared/components/{ => Dialogs}/Popup.tsx | 2 +- src/shared/components/{ => Dialogs}/Tooltip.tsx | 2 +- src/shared/components/{ => Media}/Avatar.tsx | 0 src/shared/components/{ => Media}/Gif.tsx | 0 src/shared/components/{ => Media}/Icon.tsx | 0 src/shared/components/{ => Media}/IconLink.tsx | 0 src/shared/components/{ => Media}/KonvaVideo.tsx | 0 src/shared/components/{ => Media}/Placeholder.tsx | 0 src/shared/components/Modal/index.tsx | 2 +- src/shared/components/Panel.tsx | 2 +- src/shared/components/PrivacyPolicy.tsx | 6 +++--- src/shared/components/RealmCutout/RealmPin.tsx | 2 +- src/shared/components/TahoAmount.tsx | 2 +- src/shared/components/Transactions/TransactionProgress.tsx | 4 ++-- src/ui/Assistant/AssistantContent/AssistantChallenges.tsx | 2 +- src/ui/Assistant/AssistantContent/AssistantWelcome.tsx | 2 +- src/ui/Assistant/AssistantContent/index.tsx | 2 +- src/ui/Assistant/index.tsx | 4 ++-- src/ui/Claim/ClaimAlreadyClaimed.tsx | 2 +- src/ui/Claim/ClaimCheck.tsx | 2 +- src/ui/Claim/ClaimCheckFail.tsx | 2 +- src/ui/Claim/ClaimCheckSuccess.tsx | 2 +- src/ui/Claim/ClaimFinish.tsx | 2 +- src/ui/Claim/components/ClaimCheckRules.tsx | 2 +- src/ui/Claim/modals/ClaimCongratulations.tsx | 4 ++-- src/ui/Claim/subpages/ClaimingDelegate.tsx | 4 ++-- src/ui/Claim/subpages/ClaimingPledge.tsx | 4 ++-- src/ui/Claim/subpages/ClaimingSignTx.tsx | 4 ++-- src/ui/Claim/subpages/ClaimingStats.tsx | 4 ++-- src/ui/Claim/subpages/ClaimingSteps.tsx | 2 +- src/ui/Controls/ZoomControl.tsx | 2 +- src/ui/Controls/index.tsx | 2 +- src/ui/Footer/FooterLinks.tsx | 2 +- src/ui/Footer/PopulationCount.tsx | 2 +- src/ui/Footer/RealmBar/RealmBarIcon.tsx | 2 +- src/ui/Footer/RealmBar/index.tsx | 4 ++-- src/ui/{ => Island}/Background/BackgroundOverlay.tsx | 0 src/ui/Island/Background/IslandBackground.tsx | 2 +- src/ui/Island/Details/NetOverlay.tsx | 2 +- src/ui/Island/Details/RealmPin.tsx | 2 +- src/ui/Island/Leaderboard/LeaderboardCurrentUser.tsx | 2 +- src/ui/Island/Leaderboard/index.tsx | 2 +- src/ui/Island/Modals/CongratulationsModal.tsx | 2 +- src/ui/Island/Modals/ModalLeavingRealm.tsx | 4 ++-- src/ui/Island/Modals/OnboardingModal.tsx | 2 +- .../RealmDetailsPanel/RealmDetailsChallengeInfo.tsx | 2 +- .../RealmDetailsPanel/RealmDetailsChallengeItem.tsx | 2 +- .../RealmPanel/RealmDetailsPanel/RealmDetailsHeader.tsx | 4 ++-- .../RealmPanel/RealmDetailsPanel/RealmDetailsJoin.tsx | 4 ++-- .../RealmPanel/RealmDetailsPanel/RealmDetailsRewards.tsx | 6 +++--- .../RealmPanel/RealmDetailsPanel/RealmDetailsStaked.tsx | 2 +- src/ui/Island/RealmPanel/RealmLeaderboardPanel/index.tsx | 2 +- .../RealmPanel/RealmPanelAccordion/StakeUnstakeSection.tsx | 4 ++-- src/ui/Island/RealmPanel/RealmPanelAccordion/index.tsx | 4 +++- src/ui/Island/RealmPanel/RealmPanelCloseButton.tsx | 2 +- src/{shared/components => ui/Island/Realms}/RealmIcon.tsx | 0 src/ui/Island/Reflect/CursorLabel.tsx | 2 +- src/ui/Island/Staking/StakeCongratulationsModal.tsx | 2 +- src/ui/Island/Staking/StakeForm.tsx | 2 +- src/ui/Island/Staking/UnstakeForm.tsx | 2 +- src/ui/LiquidityPool/index.tsx | 4 ++-- src/ui/Nav/AccountDropdown.tsx | 4 ++-- src/ui/Nav/AccountInfo.tsx | 4 ++-- src/ui/Nav/BraveNav.tsx | 2 +- src/ui/Nav/MobileNav.tsx | 2 +- src/ui/Nav/index.tsx | 4 ++-- src/ui/Onboarding/JoinWaitlist.tsx | 2 +- src/ui/Referrals/ReferralsTips.tsx | 2 +- src/ui/Referrals/index.tsx | 4 ++-- 76 files changed, 86 insertions(+), 84 deletions(-) rename src/shared/components/{ => DOMElements}/Accordion.tsx (98%) rename src/shared/components/{ => DOMElements}/Button.tsx (100%) rename src/shared/components/{ => DOMElements}/Input.tsx (100%) rename src/shared/components/{ => DOMElements}/Link.tsx (100%) rename src/shared/components/{ => DOMElements}/Portal.tsx (100%) rename src/shared/components/{ => DOMElements}/TabPanel.tsx (100%) rename src/shared/components/{ => DOMElements}/TokenAmountInput.tsx (100%) rename src/shared/components/{ => Dialogs}/Popup.tsx (97%) rename src/shared/components/{ => Dialogs}/Tooltip.tsx (98%) rename src/shared/components/{ => Media}/Avatar.tsx (100%) rename src/shared/components/{ => Media}/Gif.tsx (100%) rename src/shared/components/{ => Media}/Icon.tsx (100%) rename src/shared/components/{ => Media}/IconLink.tsx (100%) rename src/shared/components/{ => Media}/KonvaVideo.tsx (100%) rename src/shared/components/{ => Media}/Placeholder.tsx (100%) rename src/ui/{ => Island}/Background/BackgroundOverlay.tsx (100%) rename src/{shared/components => ui/Island/Realms}/RealmIcon.tsx (100%) diff --git a/src/shared/components/Accordion.tsx b/src/shared/components/DOMElements/Accordion.tsx similarity index 98% rename from src/shared/components/Accordion.tsx rename to src/shared/components/DOMElements/Accordion.tsx index 98868735b..d1b2f0a35 100644 --- a/src/shared/components/Accordion.tsx +++ b/src/shared/components/DOMElements/Accordion.tsx @@ -1,7 +1,7 @@ import classNames from "classnames" import React, { CSSProperties, useEffect, useState } from "react" -import arrowIcon from "../assets/icons/s/arrow-down.svg" -import Icon from "./Icon" +import arrowIcon from "shared/assets/icons/s/arrow-down.svg" +import Icon from "../Media/Icon" type AccordionType = "default" | "frame" | "challenge" | "panel" diff --git a/src/shared/components/Button.tsx b/src/shared/components/DOMElements/Button.tsx similarity index 100% rename from src/shared/components/Button.tsx rename to src/shared/components/DOMElements/Button.tsx diff --git a/src/shared/components/Input.tsx b/src/shared/components/DOMElements/Input.tsx similarity index 100% rename from src/shared/components/Input.tsx rename to src/shared/components/DOMElements/Input.tsx diff --git a/src/shared/components/Link.tsx b/src/shared/components/DOMElements/Link.tsx similarity index 100% rename from src/shared/components/Link.tsx rename to src/shared/components/DOMElements/Link.tsx diff --git a/src/shared/components/Portal.tsx b/src/shared/components/DOMElements/Portal.tsx similarity index 100% rename from src/shared/components/Portal.tsx rename to src/shared/components/DOMElements/Portal.tsx diff --git a/src/shared/components/TabPanel.tsx b/src/shared/components/DOMElements/TabPanel.tsx similarity index 100% rename from src/shared/components/TabPanel.tsx rename to src/shared/components/DOMElements/TabPanel.tsx diff --git a/src/shared/components/TokenAmountInput.tsx b/src/shared/components/DOMElements/TokenAmountInput.tsx similarity index 100% rename from src/shared/components/TokenAmountInput.tsx rename to src/shared/components/DOMElements/TokenAmountInput.tsx diff --git a/src/shared/components/Popup.tsx b/src/shared/components/Dialogs/Popup.tsx similarity index 97% rename from src/shared/components/Popup.tsx rename to src/shared/components/Dialogs/Popup.tsx index b527b3a9d..07d8ca9a2 100644 --- a/src/shared/components/Popup.tsx +++ b/src/shared/components/Dialogs/Popup.tsx @@ -1,7 +1,7 @@ import React, { ReactNode } from "react" import { animated } from "@react-spring/web" import { useVisibilityTransition } from "shared/hooks" -import Icon from "shared/components/Icon" +import Icon from "shared/components/Media/Icon" import closeIcon from "shared/assets/icons/s/close.svg" export type PopupProps = { diff --git a/src/shared/components/Tooltip.tsx b/src/shared/components/Dialogs/Tooltip.tsx similarity index 98% rename from src/shared/components/Tooltip.tsx rename to src/shared/components/Dialogs/Tooltip.tsx index 71c8dc80a..38cbe8be1 100644 --- a/src/shared/components/Tooltip.tsx +++ b/src/shared/components/Dialogs/Tooltip.tsx @@ -2,7 +2,7 @@ import React, { CSSProperties, ReactNode, useState } from "react" import infoIcon from "shared/assets/icons/m/info.svg" import { animated } from "@react-spring/web" import { useVisibilityTransition } from "shared/hooks" -import Icon from "./Icon" +import Icon from "../Media/Icon" type TooltipProps = { children: ReactNode diff --git a/src/shared/components/Avatar.tsx b/src/shared/components/Media/Avatar.tsx similarity index 100% rename from src/shared/components/Avatar.tsx rename to src/shared/components/Media/Avatar.tsx diff --git a/src/shared/components/Gif.tsx b/src/shared/components/Media/Gif.tsx similarity index 100% rename from src/shared/components/Gif.tsx rename to src/shared/components/Media/Gif.tsx diff --git a/src/shared/components/Icon.tsx b/src/shared/components/Media/Icon.tsx similarity index 100% rename from src/shared/components/Icon.tsx rename to src/shared/components/Media/Icon.tsx diff --git a/src/shared/components/IconLink.tsx b/src/shared/components/Media/IconLink.tsx similarity index 100% rename from src/shared/components/IconLink.tsx rename to src/shared/components/Media/IconLink.tsx diff --git a/src/shared/components/KonvaVideo.tsx b/src/shared/components/Media/KonvaVideo.tsx similarity index 100% rename from src/shared/components/KonvaVideo.tsx rename to src/shared/components/Media/KonvaVideo.tsx diff --git a/src/shared/components/Placeholder.tsx b/src/shared/components/Media/Placeholder.tsx similarity index 100% rename from src/shared/components/Placeholder.tsx rename to src/shared/components/Media/Placeholder.tsx diff --git a/src/shared/components/Modal/index.tsx b/src/shared/components/Modal/index.tsx index 3fa22f063..f21a1204c 100644 --- a/src/shared/components/Modal/index.tsx +++ b/src/shared/components/Modal/index.tsx @@ -2,7 +2,7 @@ import classNames from "classnames" import React, { CSSProperties } from "react" import { easings, useSpring, animated } from "@react-spring/web" -import Portal from "../Portal" +import Portal from "../DOMElements/Portal" import { noop } from "../../utils" import ClickableModalOverlay from "./ClickableModalOverlay" diff --git a/src/shared/components/Panel.tsx b/src/shared/components/Panel.tsx index b7b22d80d..2898921cb 100644 --- a/src/shared/components/Panel.tsx +++ b/src/shared/components/Panel.tsx @@ -2,7 +2,7 @@ import React, { ReactNode, CSSProperties } from "react" import classNames from "classnames" import { animated } from "@react-spring/web" import { useRealmPanelTransition } from "shared/hooks" -import Portal from "./Portal" +import Portal from "./DOMElements/Portal" type PortalSectionProps = { children: ReactNode diff --git a/src/shared/components/PrivacyPolicy.tsx b/src/shared/components/PrivacyPolicy.tsx index bc926df69..7b52066df 100644 --- a/src/shared/components/PrivacyPolicy.tsx +++ b/src/shared/components/PrivacyPolicy.tsx @@ -1,11 +1,11 @@ import React from "react" -import Popup from "shared/components/Popup" +import Popup from "shared/components/Dialogs/Popup" import cookiesIcon from "shared/assets/icons/cookies.svg" import newTabIcon from "shared/assets/icons/s/new-tab.svg" import { LINKS, LOCAL_STORAGE_COOKIES } from "shared/constants" import { useLocalStorageChange } from "shared/hooks" -import Icon from "./Icon" -import Button from "./Button" +import Icon from "./Media/Icon" +import Button from "./DOMElements/Button" export default function PrivacyPolicy() { const { value, updateStorage } = useLocalStorageChange( diff --git a/src/shared/components/RealmCutout/RealmPin.tsx b/src/shared/components/RealmCutout/RealmPin.tsx index a00a497ea..a282f50f5 100644 --- a/src/shared/components/RealmCutout/RealmPin.tsx +++ b/src/shared/components/RealmCutout/RealmPin.tsx @@ -1,6 +1,6 @@ import React from "react" import realmPin from "shared/assets/realm-pin.svg" -import Avatar from "../Avatar" +import Avatar from "../Media/Avatar" export default function RealmPin() { return ( diff --git a/src/shared/components/TahoAmount.tsx b/src/shared/components/TahoAmount.tsx index 8d81830f3..059bbe425 100644 --- a/src/shared/components/TahoAmount.tsx +++ b/src/shared/components/TahoAmount.tsx @@ -1,7 +1,7 @@ import classNames from "classnames" import React from "react" import { parseTahoAmount, separateThousandsByComma } from "../utils" -import Icon from "./Icon" +import Icon from "./Media/Icon" import lockIcon from "../assets/icons/s/lock.svg" import coinIcon from "../assets/taho-coin.svg" diff --git a/src/shared/components/Transactions/TransactionProgress.tsx b/src/shared/components/Transactions/TransactionProgress.tsx index bc81cd28c..6e1ac3f82 100644 --- a/src/shared/components/Transactions/TransactionProgress.tsx +++ b/src/shared/components/Transactions/TransactionProgress.tsx @@ -4,9 +4,9 @@ import iconNotifWrong from "shared/assets/icons/m/notif-wrong.svg" import { TransactionProgressStatus } from "shared/types" import classNames from "classnames" import { isTransactionPending } from "shared/utils" -import Button from "../Button" +import Button from "../DOMElements/Button" import Ripple from "../Loaders/Ripple" -import Icon from "../Icon" +import Icon from "../Media/Icon" export type TransactionProgressProps = { title?: string diff --git a/src/ui/Assistant/AssistantContent/AssistantChallenges.tsx b/src/ui/Assistant/AssistantContent/AssistantChallenges.tsx index 9359b8ca9..3af4b0d3b 100644 --- a/src/ui/Assistant/AssistantContent/AssistantChallenges.tsx +++ b/src/ui/Assistant/AssistantContent/AssistantChallenges.tsx @@ -1,5 +1,5 @@ import React from "react" -import Icon from "shared/components/Icon" +import Icon from "shared/components/Media/Icon" import starIcon from "shared/assets/icons/star-2.svg" import { useAssistant } from "shared/hooks" import AssistantContent from "." diff --git a/src/ui/Assistant/AssistantContent/AssistantWelcome.tsx b/src/ui/Assistant/AssistantContent/AssistantWelcome.tsx index a0b08f0d8..394a1129b 100644 --- a/src/ui/Assistant/AssistantContent/AssistantWelcome.tsx +++ b/src/ui/Assistant/AssistantContent/AssistantWelcome.tsx @@ -1,5 +1,5 @@ import React from "react" -import Icon from "shared/components/Icon" +import Icon from "shared/components/Media/Icon" import realmPointer from "shared/assets/realm-pointer.png" import { useAssistant } from "shared/hooks" import { selectNumberOfRealms, useDappSelector } from "redux-state" diff --git a/src/ui/Assistant/AssistantContent/index.tsx b/src/ui/Assistant/AssistantContent/index.tsx index da70315bf..4dc90ab5a 100644 --- a/src/ui/Assistant/AssistantContent/index.tsx +++ b/src/ui/Assistant/AssistantContent/index.tsx @@ -1,5 +1,5 @@ import React, { CSSProperties, ReactNode } from "react" -import Popup from "shared/components/Popup" +import Popup from "shared/components/Dialogs/Popup" type AssistantContentProps = { children: ReactNode diff --git a/src/ui/Assistant/index.tsx b/src/ui/Assistant/index.tsx index 938ce9276..cdceb350f 100644 --- a/src/ui/Assistant/index.tsx +++ b/src/ui/Assistant/index.tsx @@ -1,7 +1,7 @@ import React, { useEffect } from "react" -import Icon from "shared/components/Icon" +import Icon from "shared/components/Media/Icon" import assistantImage from "shared/assets/assistant.png" -import Portal from "shared/components/Portal" +import Portal from "shared/components/DOMElements/Portal" import { useAssistant } from "shared/hooks" import AssistantWelcome from "./AssistantContent/AssistantWelcome" import AssistantChallenges from "./AssistantContent/AssistantChallenges" diff --git a/src/ui/Claim/ClaimAlreadyClaimed.tsx b/src/ui/Claim/ClaimAlreadyClaimed.tsx index b14b10eed..930c61e48 100644 --- a/src/ui/Claim/ClaimAlreadyClaimed.tsx +++ b/src/ui/Claim/ClaimAlreadyClaimed.tsx @@ -1,6 +1,6 @@ import React from "react" import { useHistory } from "react-router-dom" -import Button from "shared/components/Button" +import Button from "shared/components/DOMElements/Button" import Modal from "shared/components/Modal" import TahoAmount from "shared/components/TahoAmount" import { useDappSelector, selectEligibility } from "redux-state" diff --git a/src/ui/Claim/ClaimCheck.tsx b/src/ui/Claim/ClaimCheck.tsx index 4d7276a31..0400d53c4 100644 --- a/src/ui/Claim/ClaimCheck.tsx +++ b/src/ui/Claim/ClaimCheck.tsx @@ -2,7 +2,7 @@ import React, { useEffect, useState } from "react" import classNames from "classnames" import { Redirect } from "react-router-dom" import { useDebounce } from "shared/hooks/helpers" -import Button from "shared/components/Button" +import Button from "shared/components/DOMElements/Button" import Modal from "shared/components/Modal" import Spinner from "shared/components/Loaders/Spinner" import { isProbablyEVMAddress, resolveNameToAddress } from "shared/utils" diff --git a/src/ui/Claim/ClaimCheckFail.tsx b/src/ui/Claim/ClaimCheckFail.tsx index 23ed443d6..44d3453d1 100644 --- a/src/ui/Claim/ClaimCheckFail.tsx +++ b/src/ui/Claim/ClaimCheckFail.tsx @@ -1,6 +1,6 @@ import React from "react" import { useHistory } from "react-router-dom" -import Button from "shared/components/Button" +import Button from "shared/components/DOMElements/Button" import Modal from "shared/components/Modal" import { useDappDispatch, diff --git a/src/ui/Claim/ClaimCheckSuccess.tsx b/src/ui/Claim/ClaimCheckSuccess.tsx index b53b31432..0fef946d6 100644 --- a/src/ui/Claim/ClaimCheckSuccess.tsx +++ b/src/ui/Claim/ClaimCheckSuccess.tsx @@ -3,7 +3,7 @@ import { useHistory } from "react-router-dom" import Modal from "shared/components/Modal" import TahoAmount from "shared/components/TahoAmount" import iconConnected from "shared/assets/icons/s/connected.svg" -import Button from "shared/components/Button" +import Button from "shared/components/DOMElements/Button" import { useConnect } from "shared/hooks" import { useDappSelector, diff --git a/src/ui/Claim/ClaimFinish.tsx b/src/ui/Claim/ClaimFinish.tsx index a2d3a6b77..f05a7e704 100644 --- a/src/ui/Claim/ClaimFinish.tsx +++ b/src/ui/Claim/ClaimFinish.tsx @@ -1,7 +1,7 @@ import React from "react" import { useHistory } from "react-router-dom" import TahoAmount from "shared/components/TahoAmount" -import Button from "shared/components/Button" +import Button from "shared/components/DOMElements/Button" import Modal from "shared/components/Modal" import { useDappSelector, selectEligibility } from "redux-state" import { ROUTES } from "shared/constants" diff --git a/src/ui/Claim/components/ClaimCheckRules.tsx b/src/ui/Claim/components/ClaimCheckRules.tsx index dc9d13c26..d5b2febad 100644 --- a/src/ui/Claim/components/ClaimCheckRules.tsx +++ b/src/ui/Claim/components/ClaimCheckRules.tsx @@ -1,6 +1,6 @@ import React from "react" import classNames from "classnames" -import Icon from "shared/components/Icon" +import Icon from "shared/components/Media/Icon" import iconNotifCorrect from "shared/assets/icons/s/notif-correct.svg" import iconNorifWrong from "shared/assets/icons/s/notif-wrong.svg" import { separateThousandsByComma } from "shared/utils" diff --git a/src/ui/Claim/modals/ClaimCongratulations.tsx b/src/ui/Claim/modals/ClaimCongratulations.tsx index b64a565b8..2df6b9f26 100644 --- a/src/ui/Claim/modals/ClaimCongratulations.tsx +++ b/src/ui/Claim/modals/ClaimCongratulations.tsx @@ -1,8 +1,8 @@ import React from "react" import { selectRealmById, useDappSelector } from "redux-state" -import Button from "shared/components/Button" +import Button from "shared/components/DOMElements/Button" import CongratulationsModal from "ui/Island/Modals/CongratulationsModal" -import RealmIcon from "shared/components/RealmIcon" +import RealmIcon from "ui/Island/Realms/RealmIcon" type ClaimCongratulationsProps = { displayAmount: string diff --git a/src/ui/Claim/subpages/ClaimingDelegate.tsx b/src/ui/Claim/subpages/ClaimingDelegate.tsx index b9b3dff2f..cdc88492e 100644 --- a/src/ui/Claim/subpages/ClaimingDelegate.tsx +++ b/src/ui/Claim/subpages/ClaimingDelegate.tsx @@ -5,8 +5,8 @@ import React, { useState } from "react" import { useHistory } from "react-router-dom" import classNames from "classnames" -import Button from "shared/components/Button" -import Icon from "shared/components/Icon" +import Button from "shared/components/DOMElements/Button" +import Icon from "shared/components/Media/Icon" import iconNotifCorrect from "shared/assets/icons/s/notif-correct.svg" import iconSearch from "shared/assets/icons/m/search.svg" import { ROUTES } from "shared/constants" diff --git a/src/ui/Claim/subpages/ClaimingPledge.tsx b/src/ui/Claim/subpages/ClaimingPledge.tsx index bee20ea41..57b41e24a 100644 --- a/src/ui/Claim/subpages/ClaimingPledge.tsx +++ b/src/ui/Claim/subpages/ClaimingPledge.tsx @@ -1,7 +1,7 @@ import React from "react" import { useHistory } from "react-router-dom" -import Button from "shared/components/Button" -import Icon from "shared/components/Icon" +import Button from "shared/components/DOMElements/Button" +import Icon from "shared/components/Media/Icon" import earthIcon from "shared/assets/icons/earth.svg" import communityIcon from "shared/assets/icons/community.svg" import rulerIcon from "shared/assets/icons/ruler.svg" diff --git a/src/ui/Claim/subpages/ClaimingSignTx.tsx b/src/ui/Claim/subpages/ClaimingSignTx.tsx index 9f9ae050d..c7b2d47cd 100644 --- a/src/ui/Claim/subpages/ClaimingSignTx.tsx +++ b/src/ui/Claim/subpages/ClaimingSignTx.tsx @@ -1,6 +1,6 @@ import React, { useState } from "react" -import Icon from "shared/components/Icon" -import Button from "shared/components/Button" +import Icon from "shared/components/Media/Icon" +import Button from "shared/components/DOMElements/Button" import lockIcon from "shared/assets/icons/s/lock.svg" import ClaimingTransactions from "./ClaimingTransactions" diff --git a/src/ui/Claim/subpages/ClaimingStats.tsx b/src/ui/Claim/subpages/ClaimingStats.tsx index 20a048376..ca7e6dd6f 100644 --- a/src/ui/Claim/subpages/ClaimingStats.tsx +++ b/src/ui/Claim/subpages/ClaimingStats.tsx @@ -1,9 +1,9 @@ import React from "react" import TahoAmount from "shared/components/TahoAmount" import Modal from "shared/components/Modal" -import Icon from "shared/components/Icon" +import Icon from "shared/components/Media/Icon" import infoIcon from "shared/assets/icons/m/info.svg" -import Accordion from "shared/components/Accordion" +import Accordion from "shared/components/DOMElements/Accordion" import { useDappSelector, selectEligibility } from "redux-state" import { RealmCutout } from "shared/components/RealmCutout" import ClaimCheckRules from "../components/ClaimCheckRules" diff --git a/src/ui/Claim/subpages/ClaimingSteps.tsx b/src/ui/Claim/subpages/ClaimingSteps.tsx index 4afa4764a..bd9060f2c 100644 --- a/src/ui/Claim/subpages/ClaimingSteps.tsx +++ b/src/ui/Claim/subpages/ClaimingSteps.tsx @@ -1,6 +1,6 @@ import React from "react" import classNames from "classnames" -import Icon from "shared/components/Icon" +import Icon from "shared/components/Media/Icon" import iconNotifCorrect from "shared/assets/icons/s/notif-correct.svg" import iconStatusCurrent from "shared/assets/icons/s/status-current.svg" import iconStatusUpcoming from "shared/assets/icons/s/status-upcoming.svg" diff --git a/src/ui/Controls/ZoomControl.tsx b/src/ui/Controls/ZoomControl.tsx index 18c73cf66..23d96d74e 100644 --- a/src/ui/Controls/ZoomControl.tsx +++ b/src/ui/Controls/ZoomControl.tsx @@ -1,5 +1,5 @@ import React from "react" -import Icon from "shared/components/Icon" +import Icon from "shared/components/Media/Icon" type ZoomControlProps = { icon: string diff --git a/src/ui/Controls/index.tsx b/src/ui/Controls/index.tsx index a01753d99..02d6bfad7 100644 --- a/src/ui/Controls/index.tsx +++ b/src/ui/Controls/index.tsx @@ -1,5 +1,5 @@ import React from "react" -import Portal from "shared/components/Portal" +import Portal from "shared/components/DOMElements/Portal" import { Stage } from "konva/lib/Stage" import ZoomControls from "./ZoomControls" import IslandControl from "./IslandControl" diff --git a/src/ui/Footer/FooterLinks.tsx b/src/ui/Footer/FooterLinks.tsx index b4ed42374..93ddf3ab5 100644 --- a/src/ui/Footer/FooterLinks.tsx +++ b/src/ui/Footer/FooterLinks.tsx @@ -1,5 +1,5 @@ import React from "react" -import IconLink from "shared/components/IconLink" +import IconLink from "shared/components/Media/IconLink" import { LINKS } from "shared/constants" import discordIcon from "shared/assets/icons/discord.svg" import twitterIcon from "shared/assets/icons/twitter.svg" diff --git a/src/ui/Footer/PopulationCount.tsx b/src/ui/Footer/PopulationCount.tsx index c8637d4a8..5f024eb0e 100644 --- a/src/ui/Footer/PopulationCount.tsx +++ b/src/ui/Footer/PopulationCount.tsx @@ -1,5 +1,5 @@ import React from "react" -import Icon from "shared/components/Icon" +import Icon from "shared/components/Media/Icon" import { separateThousandsByComma } from "shared/utils" import populationIcon from "shared/assets/icons/people.svg" import { selectTotalPopulation, useDappSelector } from "redux-state" diff --git a/src/ui/Footer/RealmBar/RealmBarIcon.tsx b/src/ui/Footer/RealmBar/RealmBarIcon.tsx index 3f75a8f93..08060bf13 100644 --- a/src/ui/Footer/RealmBar/RealmBarIcon.tsx +++ b/src/ui/Footer/RealmBar/RealmBarIcon.tsx @@ -1,5 +1,5 @@ import React, { useEffect, useState } from "react" -import Icon from "shared/components/Icon" +import Icon from "shared/components/Media/Icon" import { getRealmMapData } from "shared/constants" import { animated, easings, useSpring } from "@react-spring/web" import RealmBarTooltip from "./RealmBarTooltip" diff --git a/src/ui/Footer/RealmBar/index.tsx b/src/ui/Footer/RealmBar/index.tsx index 6278d0059..72f0fc614 100644 --- a/src/ui/Footer/RealmBar/index.tsx +++ b/src/ui/Footer/RealmBar/index.tsx @@ -1,7 +1,7 @@ import React, { useRef } from "react" import populationIcon from "shared/assets/icons/people.svg" -import Icon from "shared/components/Icon" -import Tooltip from "shared/components/Tooltip" +import Icon from "shared/components/Media/Icon" +import Tooltip from "shared/components/Dialogs/Tooltip" import { separateThousandsByComma } from "shared/utils" import { selectSortedDisplayedPopulation, diff --git a/src/ui/Background/BackgroundOverlay.tsx b/src/ui/Island/Background/BackgroundOverlay.tsx similarity index 100% rename from src/ui/Background/BackgroundOverlay.tsx rename to src/ui/Island/Background/BackgroundOverlay.tsx diff --git a/src/ui/Island/Background/IslandBackground.tsx b/src/ui/Island/Background/IslandBackground.tsx index c32dfdc2e..c14324b91 100644 --- a/src/ui/Island/Background/IslandBackground.tsx +++ b/src/ui/Island/Background/IslandBackground.tsx @@ -19,7 +19,7 @@ import { import { usePrevious, useBeforeFirstPaint, useTimeout } from "shared/hooks" import { createBackgroundMask } from "shared/utils" import { OverlayType } from "shared/types" -import BackgroundOverlay from "ui/Background/BackgroundOverlay" +import BackgroundOverlay from "ui/Island/Background/BackgroundOverlay" import { selectRealmPanelVisible, useDappSelector } from "redux-state" const getOverlay = (overlay: OverlayType) => { diff --git a/src/ui/Island/Details/NetOverlay.tsx b/src/ui/Island/Details/NetOverlay.tsx index 6b9768e6b..c7bb1b037 100644 --- a/src/ui/Island/Details/NetOverlay.tsx +++ b/src/ui/Island/Details/NetOverlay.tsx @@ -2,7 +2,7 @@ import React, { memo } from "react" import { Group } from "react-konva" import netGif from "shared/assets/island-overlay-net.gif" import { FIGMA_FACTOR } from "shared/constants" -import Gif from "../../../shared/components/Gif" +import Gif from "../../../shared/components/Media/Gif" function NetOverlay() { return ( diff --git a/src/ui/Island/Details/RealmPin.tsx b/src/ui/Island/Details/RealmPin.tsx index 6978694be..20d61595e 100644 --- a/src/ui/Island/Details/RealmPin.tsx +++ b/src/ui/Island/Details/RealmPin.tsx @@ -12,7 +12,7 @@ import { } from "redux-state" import { FIGMA_FACTOR, getRealmMapData } from "shared/constants" import { getPinShift } from "shared/utils" -import KonvaVideo from "shared/components/KonvaVideo" +import KonvaVideo from "shared/components/Media/KonvaVideo" type RealmPinAvatarProps = { x: number diff --git a/src/ui/Island/Leaderboard/LeaderboardCurrentUser.tsx b/src/ui/Island/Leaderboard/LeaderboardCurrentUser.tsx index 5e1bbb20e..9c27da924 100644 --- a/src/ui/Island/Leaderboard/LeaderboardCurrentUser.tsx +++ b/src/ui/Island/Leaderboard/LeaderboardCurrentUser.tsx @@ -6,7 +6,7 @@ import { selectWalletName, useDappSelector, } from "redux-state" -import Icon from "shared/components/Icon" +import Icon from "shared/components/Media/Icon" import { bigIntToDisplayUserAmount, separateThousandsByComma, diff --git a/src/ui/Island/Leaderboard/index.tsx b/src/ui/Island/Leaderboard/index.tsx index af4e442a6..a97762e28 100644 --- a/src/ui/Island/Leaderboard/index.tsx +++ b/src/ui/Island/Leaderboard/index.tsx @@ -7,7 +7,7 @@ import { useDappSelector, } from "redux-state" import LeaderboardItem from "./LeaderboardItem" -import RealmDetailsPlaceholder from "../../../shared/components/Placeholder" +import RealmDetailsPlaceholder from "../../../shared/components/Media/Placeholder" const leaderboardDateAvailable = "Nov 30" diff --git a/src/ui/Island/Modals/CongratulationsModal.tsx b/src/ui/Island/Modals/CongratulationsModal.tsx index 910c84d6c..97c145f28 100644 --- a/src/ui/Island/Modals/CongratulationsModal.tsx +++ b/src/ui/Island/Modals/CongratulationsModal.tsx @@ -1,6 +1,6 @@ import React, { ReactElement, ReactNode } from "react" import Modal from "../../../shared/components/Modal" -import Button from "../../../shared/components/Button" +import Button from "../../../shared/components/DOMElements/Button" type CongratulationsModalProps = { children: string | ReactNode diff --git a/src/ui/Island/Modals/ModalLeavingRealm.tsx b/src/ui/Island/Modals/ModalLeavingRealm.tsx index 757a0c240..05293f893 100644 --- a/src/ui/Island/Modals/ModalLeavingRealm.tsx +++ b/src/ui/Island/Modals/ModalLeavingRealm.tsx @@ -1,8 +1,8 @@ import React from "react" import Modal from "shared/components/Modal" -import Icon from "shared/components/Icon" +import Icon from "shared/components/Media/Icon" import lightIcon from "shared/assets/icons/m/light.svg" -import Button from "shared/components/Button" +import Button from "shared/components/DOMElements/Button" import TransactionProgress, { TransactionProgressProps, diff --git a/src/ui/Island/Modals/OnboardingModal.tsx b/src/ui/Island/Modals/OnboardingModal.tsx index b3679cbe5..f2299bea6 100644 --- a/src/ui/Island/Modals/OnboardingModal.tsx +++ b/src/ui/Island/Modals/OnboardingModal.tsx @@ -1,6 +1,6 @@ import React, { ReactNode } from "react" import Modal from "../../../shared/components/Modal" -import Button from "../../../shared/components/Button" +import Button from "../../../shared/components/DOMElements/Button" type OnboardingModalProps = { children: ReactNode diff --git a/src/ui/Island/RealmPanel/RealmDetailsPanel/RealmDetailsChallengeInfo.tsx b/src/ui/Island/RealmPanel/RealmDetailsPanel/RealmDetailsChallengeInfo.tsx index f05ef7ea2..8e5f02870 100644 --- a/src/ui/Island/RealmPanel/RealmDetailsPanel/RealmDetailsChallengeInfo.tsx +++ b/src/ui/Island/RealmPanel/RealmDetailsPanel/RealmDetailsChallengeInfo.tsx @@ -1,5 +1,5 @@ import React, { ReactNode } from "react" -import Icon from "shared/components/Icon" +import Icon from "shared/components/Media/Icon" import lightIcon from "shared/assets/icons/m/light.svg" export default function RealmDetailsChallengeInfo({ diff --git a/src/ui/Island/RealmPanel/RealmDetailsPanel/RealmDetailsChallengeItem.tsx b/src/ui/Island/RealmPanel/RealmDetailsPanel/RealmDetailsChallengeItem.tsx index 266f55991..68ee18b45 100644 --- a/src/ui/Island/RealmPanel/RealmDetailsPanel/RealmDetailsChallengeItem.tsx +++ b/src/ui/Island/RealmPanel/RealmDetailsPanel/RealmDetailsChallengeItem.tsx @@ -1,6 +1,6 @@ import React, { useCallback } from "react" import Markdown from "react-markdown" -import Accordion from "shared/components/Accordion" +import Accordion from "shared/components/DOMElements/Accordion" import { useDisplayedChallenges } from "shared/hooks" type RealmDetailsChallengeItemProps = { diff --git a/src/ui/Island/RealmPanel/RealmDetailsPanel/RealmDetailsHeader.tsx b/src/ui/Island/RealmPanel/RealmDetailsPanel/RealmDetailsHeader.tsx index 4bd8fab95..1d021e231 100644 --- a/src/ui/Island/RealmPanel/RealmDetailsPanel/RealmDetailsHeader.tsx +++ b/src/ui/Island/RealmPanel/RealmDetailsPanel/RealmDetailsHeader.tsx @@ -1,7 +1,7 @@ import React from "react" -import Icon from "shared/components/Icon" +import Icon from "shared/components/Media/Icon" import iconCommunity from "shared/assets/icons/people.svg" -import RealmIcon from "shared/components/RealmIcon" +import RealmIcon from "ui/Island/Realms/RealmIcon" import { getRadialGradientFromRealmColor, separateThousandsByComma, diff --git a/src/ui/Island/RealmPanel/RealmDetailsPanel/RealmDetailsJoin.tsx b/src/ui/Island/RealmPanel/RealmDetailsPanel/RealmDetailsJoin.tsx index 66ddcb129..05be23619 100644 --- a/src/ui/Island/RealmPanel/RealmDetailsPanel/RealmDetailsJoin.tsx +++ b/src/ui/Island/RealmPanel/RealmDetailsPanel/RealmDetailsJoin.tsx @@ -1,6 +1,6 @@ import React from "react" -import Button from "shared/components/Button" -import Icon from "shared/components/Icon" +import Button from "shared/components/DOMElements/Button" +import Icon from "shared/components/Media/Icon" import lightIcon from "shared/assets/icons/m/light.svg" type RealmDetailsJoinProps = { diff --git a/src/ui/Island/RealmPanel/RealmDetailsPanel/RealmDetailsRewards.tsx b/src/ui/Island/RealmPanel/RealmDetailsPanel/RealmDetailsRewards.tsx index d5490d303..694a2258d 100644 --- a/src/ui/Island/RealmPanel/RealmDetailsPanel/RealmDetailsRewards.tsx +++ b/src/ui/Island/RealmPanel/RealmDetailsPanel/RealmDetailsRewards.tsx @@ -7,9 +7,9 @@ import { selectUnclaimedXpSumById, useDappSelector, } from "redux-state" -import Button from "shared/components/Button" -import RealmIcon from "shared/components/RealmIcon" -import Tooltip from "shared/components/Tooltip" +import Button from "shared/components/DOMElements/Button" +import RealmIcon from "ui/Island/Realms/RealmIcon" +import Tooltip from "shared/components/Dialogs/Tooltip" import { LINKS } from "shared/constants" import { bigIntToDisplayUserAmount } from "shared/utils" import ClaimCongratulations from "ui/Claim/modals/ClaimCongratulations" diff --git a/src/ui/Island/RealmPanel/RealmDetailsPanel/RealmDetailsStaked.tsx b/src/ui/Island/RealmPanel/RealmDetailsPanel/RealmDetailsStaked.tsx index f02b49be7..6ce07307e 100644 --- a/src/ui/Island/RealmPanel/RealmDetailsPanel/RealmDetailsStaked.tsx +++ b/src/ui/Island/RealmPanel/RealmDetailsPanel/RealmDetailsStaked.tsx @@ -1,5 +1,5 @@ import React from "react" -import Icon from "shared/components/Icon" +import Icon from "shared/components/Media/Icon" import lightIcon from "shared/assets/icons/m/light.svg" type RealmDetailsStakedProps = { diff --git a/src/ui/Island/RealmPanel/RealmLeaderboardPanel/index.tsx b/src/ui/Island/RealmPanel/RealmLeaderboardPanel/index.tsx index dc27c7d69..71cf2417b 100644 --- a/src/ui/Island/RealmPanel/RealmLeaderboardPanel/index.tsx +++ b/src/ui/Island/RealmPanel/RealmLeaderboardPanel/index.tsx @@ -1,6 +1,6 @@ import React, { useState } from "react" import Panel from "shared/components/Panel" -import TabPanel from "shared/components/TabPanel" +import TabPanel from "shared/components/DOMElements/TabPanel" import LeaderboardList from "ui/Island/Leaderboard" import LeaderboardCurrentUser from "ui/Island/Leaderboard/LeaderboardCurrentUser" diff --git a/src/ui/Island/RealmPanel/RealmPanelAccordion/StakeUnstakeSection.tsx b/src/ui/Island/RealmPanel/RealmPanelAccordion/StakeUnstakeSection.tsx index 914ed2142..f24d0469e 100644 --- a/src/ui/Island/RealmPanel/RealmPanelAccordion/StakeUnstakeSection.tsx +++ b/src/ui/Island/RealmPanel/RealmPanelAccordion/StakeUnstakeSection.tsx @@ -7,10 +7,10 @@ import { useDappSelector, } from "redux-state" import { TAHO_ADDRESS } from "shared/constants" -import TabPanel from "shared/components/TabPanel" +import TabPanel from "shared/components/DOMElements/TabPanel" import StakeForm from "ui/Island/Staking/StakeForm" import UnstakeForm from "ui/Island/Staking/UnstakeForm" -import { AccordionOutsideActions } from "shared/components/Accordion" +import { AccordionOutsideActions } from "shared/components/DOMElements/Accordion" import RealmPanelAccordion from "." function isFormDisabled( diff --git a/src/ui/Island/RealmPanel/RealmPanelAccordion/index.tsx b/src/ui/Island/RealmPanel/RealmPanelAccordion/index.tsx index 6b743323c..ece861bcb 100644 --- a/src/ui/Island/RealmPanel/RealmPanelAccordion/index.tsx +++ b/src/ui/Island/RealmPanel/RealmPanelAccordion/index.tsx @@ -1,6 +1,8 @@ import React from "react" import { selectRealmPanelVisible, useDappSelector } from "redux-state" -import Accordion, { CommonAccordion } from "shared/components/Accordion" +import Accordion, { + CommonAccordion, +} from "shared/components/DOMElements/Accordion" export default function RealmDetailsAccordion({ title, diff --git a/src/ui/Island/RealmPanel/RealmPanelCloseButton.tsx b/src/ui/Island/RealmPanel/RealmPanelCloseButton.tsx index 1ab1987c1..e067f75d3 100644 --- a/src/ui/Island/RealmPanel/RealmPanelCloseButton.tsx +++ b/src/ui/Island/RealmPanel/RealmPanelCloseButton.tsx @@ -2,7 +2,7 @@ import React from "react" import closeIcon from "shared/assets/icons/s/close-black.svg" import { animated } from "@react-spring/web" import { useRealmCloseButtonTransition } from "shared/hooks" -import Button from "../../../shared/components/Button" +import Button from "../../../shared/components/DOMElements/Button" export default function RealmPanelCloseButton({ onClose, diff --git a/src/shared/components/RealmIcon.tsx b/src/ui/Island/Realms/RealmIcon.tsx similarity index 100% rename from src/shared/components/RealmIcon.tsx rename to src/ui/Island/Realms/RealmIcon.tsx diff --git a/src/ui/Island/Reflect/CursorLabel.tsx b/src/ui/Island/Reflect/CursorLabel.tsx index 6eaafb527..2cd2b401a 100644 --- a/src/ui/Island/Reflect/CursorLabel.tsx +++ b/src/ui/Island/Reflect/CursorLabel.tsx @@ -1,5 +1,5 @@ import React from "react" -import Icon from "shared/components/Icon" +import Icon from "shared/components/Media/Icon" import { ReflectCursor, ReflectUserInfo } from "shared/types" import { REALM_ICONS } from "shared/constants" diff --git a/src/ui/Island/Staking/StakeCongratulationsModal.tsx b/src/ui/Island/Staking/StakeCongratulationsModal.tsx index b7b10f33a..efcc1762d 100644 --- a/src/ui/Island/Staking/StakeCongratulationsModal.tsx +++ b/src/ui/Island/Staking/StakeCongratulationsModal.tsx @@ -4,7 +4,7 @@ import { useDappSelector, selectDisplayedRealmId, } from "redux-state" -import Button from "shared/components/Button" +import Button from "shared/components/DOMElements/Button" import CongratulationsModal from "ui/Island/Modals/CongratulationsModal" import { RealmCutout } from "shared/components/RealmCutout" diff --git a/src/ui/Island/Staking/StakeForm.tsx b/src/ui/Island/Staking/StakeForm.tsx index 5bcb102d0..f036d85d7 100644 --- a/src/ui/Island/Staking/StakeForm.tsx +++ b/src/ui/Island/Staking/StakeForm.tsx @@ -1,5 +1,5 @@ import React, { useCallback, useEffect, useState } from "react" -import TokenAmountInput from "shared/components/TokenAmountInput" +import TokenAmountInput from "shared/components/DOMElements/TokenAmountInput" import TransactionsModal from "shared/components/Transactions/TransactionsModal" import { stakeTaho, diff --git a/src/ui/Island/Staking/UnstakeForm.tsx b/src/ui/Island/Staking/UnstakeForm.tsx index fbbbb61db..422965e21 100644 --- a/src/ui/Island/Staking/UnstakeForm.tsx +++ b/src/ui/Island/Staking/UnstakeForm.tsx @@ -1,5 +1,5 @@ import React, { useCallback, useEffect, useState } from "react" -import TokenAmountInput from "shared/components/TokenAmountInput" +import TokenAmountInput from "shared/components/DOMElements/TokenAmountInput" import TransactionsModal from "shared/components/Transactions/TransactionsModal" import { useDappDispatch, diff --git a/src/ui/LiquidityPool/index.tsx b/src/ui/LiquidityPool/index.tsx index 0e19573a8..5d72b646b 100644 --- a/src/ui/LiquidityPool/index.tsx +++ b/src/ui/LiquidityPool/index.tsx @@ -9,9 +9,9 @@ import { } from "redux-state" import { isValidInputAmount } from "shared/utils" import { useArbitrumProvider } from "shared/hooks" -import Button from "shared/components/Button" +import Button from "shared/components/DOMElements/Button" import Modal from "shared/components/Modal" -import TokenAmountInput from "shared/components/TokenAmountInput" +import TokenAmountInput from "shared/components/DOMElements/TokenAmountInput" import { ETH_ADDRESS, TAHO_ADDRESS } from "shared/constants" const LP_TX_ID = "joinLP" diff --git a/src/ui/Nav/AccountDropdown.tsx b/src/ui/Nav/AccountDropdown.tsx index 39706af23..98ab702f6 100644 --- a/src/ui/Nav/AccountDropdown.tsx +++ b/src/ui/Nav/AccountDropdown.tsx @@ -1,8 +1,8 @@ import React, { useEffect, useRef } from "react" import { useConnect } from "shared/hooks" -import Button from "shared/components/Button" +import Button from "shared/components/DOMElements/Button" import { useDappSelector, selectWalletName } from "redux-state" -import Icon from "shared/components/Icon" +import Icon from "shared/components/Media/Icon" import disconnectIcon from "shared/assets/icons/m/disconnect.svg" import arbitrumIcon from "shared/assets/partners/arbitrum.svg" diff --git a/src/ui/Nav/AccountInfo.tsx b/src/ui/Nav/AccountInfo.tsx index 140c0eb67..6ea0ff9bb 100644 --- a/src/ui/Nav/AccountInfo.tsx +++ b/src/ui/Nav/AccountInfo.tsx @@ -5,9 +5,9 @@ import { selectStakingRealmId, selectRealmById, } from "redux-state" -import RealmIcon from "shared/components/RealmIcon" +import RealmIcon from "ui/Island/Realms/RealmIcon" import { getRealmColor } from "shared/constants" -import Avatar from "shared/components/Avatar" +import Avatar from "shared/components/Media/Avatar" import AccountDropdown from "./AccountDropdown" export default function AccountInfo() { diff --git a/src/ui/Nav/BraveNav.tsx b/src/ui/Nav/BraveNav.tsx index c26705dec..d06852cf1 100644 --- a/src/ui/Nav/BraveNav.tsx +++ b/src/ui/Nav/BraveNav.tsx @@ -1,5 +1,5 @@ import React from "react" -import Icon from "shared/components/Icon" +import Icon from "shared/components/Media/Icon" import braveIcon from "shared/assets/brave.png" import { LINKS, LOCAL_STORAGE_BRAVE } from "shared/constants" import closeIcon from "shared/assets/icons/s/close-black.svg" diff --git a/src/ui/Nav/MobileNav.tsx b/src/ui/Nav/MobileNav.tsx index 025c6139f..7bfd98de8 100644 --- a/src/ui/Nav/MobileNav.tsx +++ b/src/ui/Nav/MobileNav.tsx @@ -1,6 +1,6 @@ import React from "react" import logoIcon from "shared/assets/nav_logo.svg" -import Icon from "shared/components/Icon" +import Icon from "shared/components/Media/Icon" import { useResetTenderlyFork } from "shared/hooks" import NavContainer from "./NavContainer" diff --git a/src/ui/Nav/index.tsx b/src/ui/Nav/index.tsx index 5b3971d45..bbbbb2380 100644 --- a/src/ui/Nav/index.tsx +++ b/src/ui/Nav/index.tsx @@ -1,9 +1,9 @@ import React from "react" -import Button from "shared/components/Button" +import Button from "shared/components/DOMElements/Button" import logoIcon from "shared/assets/nav_logo.svg" import walletIcon from "shared/assets/icons/wallet.svg" import { useConnect, useResetTenderlyFork } from "shared/hooks" -import Icon from "shared/components/Icon" +import Icon from "shared/components/Media/Icon" import AccountInfo from "./AccountInfo" import NavItems from "./NavItems" import NavContainer from "./NavContainer" diff --git a/src/ui/Onboarding/JoinWaitlist.tsx b/src/ui/Onboarding/JoinWaitlist.tsx index fe4c0ea5e..92f05ba37 100644 --- a/src/ui/Onboarding/JoinWaitlist.tsx +++ b/src/ui/Onboarding/JoinWaitlist.tsx @@ -1,6 +1,6 @@ import React from "react" import OnboardingModal from "ui/Island/Modals/OnboardingModal" -import Icon from "shared/components/Icon" +import Icon from "shared/components/Media/Icon" import newTab from "shared/assets/icons/m/new-tab.svg" import { LINKS } from "shared/constants" diff --git a/src/ui/Referrals/ReferralsTips.tsx b/src/ui/Referrals/ReferralsTips.tsx index 95f06ea6d..8d6c4f328 100644 --- a/src/ui/Referrals/ReferralsTips.tsx +++ b/src/ui/Referrals/ReferralsTips.tsx @@ -1,6 +1,6 @@ import React from "react" import lightIcon from "shared/assets/icons/m/light.svg" -import Icon from "shared/components/Icon" +import Icon from "shared/components/Media/Icon" export default function ReferralsTips() { return ( diff --git a/src/ui/Referrals/index.tsx b/src/ui/Referrals/index.tsx index 9892a8911..9ad7ca704 100644 --- a/src/ui/Referrals/index.tsx +++ b/src/ui/Referrals/index.tsx @@ -1,8 +1,8 @@ import React from "react" import { useConnect } from "shared/hooks" import TahoAmount from "shared/components/TahoAmount" -import Button from "shared/components/Button" -import Icon from "shared/components/Icon" +import Button from "shared/components/DOMElements/Button" +import Icon from "shared/components/Media/Icon" import Modal from "shared/components/Modal" import eyeIcon from "shared/assets/icons/m/eye.svg" import twitterIcon from "shared/assets/icons/twitter.svg" From 1604ac47e8429a0e1ac3070428ec440720020ee8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Paczy=C5=84ski?= Date: Thu, 7 Dec 2023 09:33:29 +0100 Subject: [PATCH 5/6] Add correct import --- src/ui/Island/RealmPanel/RealmPanelCountdown.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ui/Island/RealmPanel/RealmPanelCountdown.tsx b/src/ui/Island/RealmPanel/RealmPanelCountdown.tsx index 1b7addf59..efbd1b299 100644 --- a/src/ui/Island/RealmPanel/RealmPanelCountdown.tsx +++ b/src/ui/Island/RealmPanel/RealmPanelCountdown.tsx @@ -7,7 +7,7 @@ import { } from "redux-state" import { getNextSelectedWeekDay, getTimeRemaining } from "shared/utils" import xpBoostIcon from "shared/assets/icons/xp-boost.svg" -import Icon from "../Icon" +import Icon from "shared/components/Media/Icon" export default function RealmPanelCountdown() { const seasonWeek = useDappSelector(selectSeasonWeek) From 6d7b89d84478433357ffca4f62f5c7fbe138096c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Paczy=C5=84ski?= Date: Thu, 7 Dec 2023 14:53:36 +0100 Subject: [PATCH 6/6] Further `components` cleanup --- .../{Modal => Dialogs}/ClickableModalOverlay.tsx | 0 .../components/{Modal/index.tsx => Dialogs/Modal.tsx} | 2 +- src/shared/components/{ => Dialogs}/Panel.tsx | 2 +- .../components/{DOMElements => Interface}/Accordion.tsx | 0 .../components/{DOMElements => Interface}/Button.tsx | 0 .../components/{DOMElements => Interface}/Input.tsx | 0 src/shared/components/{DOMElements => Interface}/Link.tsx | 0 .../components/{DOMElements => Interface}/Portal.tsx | 0 .../components/{DOMElements => Interface}/TabPanel.tsx | 0 src/shared/components/{ => Interface}/TahoAmount.tsx | 8 ++++---- .../{DOMElements => Interface}/TokenAmountInput.tsx | 0 src/shared/components/{ => Misc}/PrivacyPolicy.tsx | 4 ++-- src/shared/components/{ => Misc}/Version.tsx | 0 src/shared/components/{RealmCutout => Realm}/Bubble.tsx | 0 .../{RealmCutout => Realm}/RealmBackgroundCutout.tsx | 0 .../components/{RealmCutout => Realm}/RealmCutout.tsx | 0 src/shared/components/{RealmCutout => Realm}/RealmPin.tsx | 0 src/shared/components/{RealmCutout => Realm}/index.ts | 0 .../components/Transactions/TransactionProgress.tsx | 2 +- src/shared/components/Transactions/TransactionsModal.tsx | 2 +- src/ui/Assistant/index.tsx | 2 +- src/ui/Claim/ClaimAlreadyClaimed.tsx | 6 +++--- src/ui/Claim/ClaimCheck.tsx | 4 ++-- src/ui/Claim/ClaimCheckFail.tsx | 4 ++-- src/ui/Claim/ClaimCheckSuccess.tsx | 6 +++--- src/ui/Claim/ClaimFinish.tsx | 6 +++--- src/ui/Claim/modals/ClaimCongratulations.tsx | 2 +- src/ui/Claim/subpages/ClaimingDelegate.tsx | 2 +- src/ui/Claim/subpages/ClaimingFlow.tsx | 2 +- src/ui/Claim/subpages/ClaimingPledge.tsx | 2 +- src/ui/Claim/subpages/ClaimingSignTx.tsx | 2 +- src/ui/Claim/subpages/ClaimingStats.tsx | 8 ++++---- src/ui/Claim/subpages/index.tsx | 2 +- src/ui/Controls/index.tsx | 2 +- src/ui/DApps/DesktopDApp.tsx | 2 +- src/ui/Footer/index.tsx | 2 +- src/ui/Island/Modals/CongratulationsModal.tsx | 4 ++-- src/ui/Island/Modals/ModalLeavingRealm.tsx | 4 ++-- src/ui/Island/Modals/OnboardingModal.tsx | 4 ++-- .../RealmDetailsPanel/RealmDetailsChallengeItem.tsx | 2 +- .../RealmPanel/RealmDetailsPanel/RealmDetailsContent.tsx | 2 +- .../RealmPanel/RealmDetailsPanel/RealmDetailsJoin.tsx | 2 +- .../RealmPanel/RealmDetailsPanel/RealmDetailsRewards.tsx | 2 +- src/ui/Island/RealmPanel/RealmLeaderboardPanel/index.tsx | 4 ++-- .../RealmPanelAccordion/StakeUnstakeSection.tsx | 4 ++-- src/ui/Island/RealmPanel/RealmPanelAccordion/index.tsx | 2 +- src/ui/Island/RealmPanel/RealmPanelCloseButton.tsx | 2 +- src/ui/Island/RealmPanel/index.tsx | 2 +- src/ui/Island/Realms/Realm.tsx | 2 +- src/ui/Island/Staking/StakeCongratulationsModal.tsx | 4 ++-- src/ui/Island/Staking/StakeForm.tsx | 2 +- src/ui/Island/Staking/UnstakeForm.tsx | 2 +- src/ui/LiquidityPool/index.tsx | 6 +++--- src/ui/Nav/AccountDropdown.tsx | 2 +- src/ui/Nav/index.tsx | 2 +- src/ui/Onboarding/index.tsx | 2 +- src/ui/Referrals/index.tsx | 6 +++--- 57 files changed, 68 insertions(+), 68 deletions(-) rename src/shared/components/{Modal => Dialogs}/ClickableModalOverlay.tsx (100%) rename src/shared/components/{Modal/index.tsx => Dialogs/Modal.tsx} (99%) rename src/shared/components/{ => Dialogs}/Panel.tsx (97%) rename src/shared/components/{DOMElements => Interface}/Accordion.tsx (100%) rename src/shared/components/{DOMElements => Interface}/Button.tsx (100%) rename src/shared/components/{DOMElements => Interface}/Input.tsx (100%) rename src/shared/components/{DOMElements => Interface}/Link.tsx (100%) rename src/shared/components/{DOMElements => Interface}/Portal.tsx (100%) rename src/shared/components/{DOMElements => Interface}/TabPanel.tsx (100%) rename src/shared/components/{ => Interface}/TahoAmount.tsx (90%) rename src/shared/components/{DOMElements => Interface}/TokenAmountInput.tsx (100%) rename src/shared/components/{ => Misc}/PrivacyPolicy.tsx (96%) rename src/shared/components/{ => Misc}/Version.tsx (100%) rename src/shared/components/{RealmCutout => Realm}/Bubble.tsx (100%) rename src/shared/components/{RealmCutout => Realm}/RealmBackgroundCutout.tsx (100%) rename src/shared/components/{RealmCutout => Realm}/RealmCutout.tsx (100%) rename src/shared/components/{RealmCutout => Realm}/RealmPin.tsx (100%) rename src/shared/components/{RealmCutout => Realm}/index.ts (100%) diff --git a/src/shared/components/Modal/ClickableModalOverlay.tsx b/src/shared/components/Dialogs/ClickableModalOverlay.tsx similarity index 100% rename from src/shared/components/Modal/ClickableModalOverlay.tsx rename to src/shared/components/Dialogs/ClickableModalOverlay.tsx diff --git a/src/shared/components/Modal/index.tsx b/src/shared/components/Dialogs/Modal.tsx similarity index 99% rename from src/shared/components/Modal/index.tsx rename to src/shared/components/Dialogs/Modal.tsx index f21a1204c..ab84eac58 100644 --- a/src/shared/components/Modal/index.tsx +++ b/src/shared/components/Dialogs/Modal.tsx @@ -2,7 +2,7 @@ import classNames from "classnames" import React, { CSSProperties } from "react" import { easings, useSpring, animated } from "@react-spring/web" -import Portal from "../DOMElements/Portal" +import Portal from "../Interface/Portal" import { noop } from "../../utils" import ClickableModalOverlay from "./ClickableModalOverlay" diff --git a/src/shared/components/Panel.tsx b/src/shared/components/Dialogs/Panel.tsx similarity index 97% rename from src/shared/components/Panel.tsx rename to src/shared/components/Dialogs/Panel.tsx index 2898921cb..e36cc4b9c 100644 --- a/src/shared/components/Panel.tsx +++ b/src/shared/components/Dialogs/Panel.tsx @@ -2,7 +2,7 @@ import React, { ReactNode, CSSProperties } from "react" import classNames from "classnames" import { animated } from "@react-spring/web" import { useRealmPanelTransition } from "shared/hooks" -import Portal from "./DOMElements/Portal" +import Portal from "../Interface/Portal" type PortalSectionProps = { children: ReactNode diff --git a/src/shared/components/DOMElements/Accordion.tsx b/src/shared/components/Interface/Accordion.tsx similarity index 100% rename from src/shared/components/DOMElements/Accordion.tsx rename to src/shared/components/Interface/Accordion.tsx diff --git a/src/shared/components/DOMElements/Button.tsx b/src/shared/components/Interface/Button.tsx similarity index 100% rename from src/shared/components/DOMElements/Button.tsx rename to src/shared/components/Interface/Button.tsx diff --git a/src/shared/components/DOMElements/Input.tsx b/src/shared/components/Interface/Input.tsx similarity index 100% rename from src/shared/components/DOMElements/Input.tsx rename to src/shared/components/Interface/Input.tsx diff --git a/src/shared/components/DOMElements/Link.tsx b/src/shared/components/Interface/Link.tsx similarity index 100% rename from src/shared/components/DOMElements/Link.tsx rename to src/shared/components/Interface/Link.tsx diff --git a/src/shared/components/DOMElements/Portal.tsx b/src/shared/components/Interface/Portal.tsx similarity index 100% rename from src/shared/components/DOMElements/Portal.tsx rename to src/shared/components/Interface/Portal.tsx diff --git a/src/shared/components/DOMElements/TabPanel.tsx b/src/shared/components/Interface/TabPanel.tsx similarity index 100% rename from src/shared/components/DOMElements/TabPanel.tsx rename to src/shared/components/Interface/TabPanel.tsx diff --git a/src/shared/components/TahoAmount.tsx b/src/shared/components/Interface/TahoAmount.tsx similarity index 90% rename from src/shared/components/TahoAmount.tsx rename to src/shared/components/Interface/TahoAmount.tsx index 059bbe425..33aa6f9ce 100644 --- a/src/shared/components/TahoAmount.tsx +++ b/src/shared/components/Interface/TahoAmount.tsx @@ -1,9 +1,9 @@ import classNames from "classnames" import React from "react" -import { parseTahoAmount, separateThousandsByComma } from "../utils" -import Icon from "./Media/Icon" -import lockIcon from "../assets/icons/s/lock.svg" -import coinIcon from "../assets/taho-coin.svg" +import lockIcon from "shared/assets/icons/s/lock.svg" +import coinIcon from "shared/assets/taho-coin.svg" +import { parseTahoAmount, separateThousandsByComma } from "../../utils" +import Icon from "../Media/Icon" type TahoAmountProps = { amount?: bigint diff --git a/src/shared/components/DOMElements/TokenAmountInput.tsx b/src/shared/components/Interface/TokenAmountInput.tsx similarity index 100% rename from src/shared/components/DOMElements/TokenAmountInput.tsx rename to src/shared/components/Interface/TokenAmountInput.tsx diff --git a/src/shared/components/PrivacyPolicy.tsx b/src/shared/components/Misc/PrivacyPolicy.tsx similarity index 96% rename from src/shared/components/PrivacyPolicy.tsx rename to src/shared/components/Misc/PrivacyPolicy.tsx index 7b52066df..5c8822672 100644 --- a/src/shared/components/PrivacyPolicy.tsx +++ b/src/shared/components/Misc/PrivacyPolicy.tsx @@ -4,8 +4,8 @@ import cookiesIcon from "shared/assets/icons/cookies.svg" import newTabIcon from "shared/assets/icons/s/new-tab.svg" import { LINKS, LOCAL_STORAGE_COOKIES } from "shared/constants" import { useLocalStorageChange } from "shared/hooks" -import Icon from "./Media/Icon" -import Button from "./DOMElements/Button" +import Icon from "../Media/Icon" +import Button from "../Interface/Button" export default function PrivacyPolicy() { const { value, updateStorage } = useLocalStorageChange( diff --git a/src/shared/components/Version.tsx b/src/shared/components/Misc/Version.tsx similarity index 100% rename from src/shared/components/Version.tsx rename to src/shared/components/Misc/Version.tsx diff --git a/src/shared/components/RealmCutout/Bubble.tsx b/src/shared/components/Realm/Bubble.tsx similarity index 100% rename from src/shared/components/RealmCutout/Bubble.tsx rename to src/shared/components/Realm/Bubble.tsx diff --git a/src/shared/components/RealmCutout/RealmBackgroundCutout.tsx b/src/shared/components/Realm/RealmBackgroundCutout.tsx similarity index 100% rename from src/shared/components/RealmCutout/RealmBackgroundCutout.tsx rename to src/shared/components/Realm/RealmBackgroundCutout.tsx diff --git a/src/shared/components/RealmCutout/RealmCutout.tsx b/src/shared/components/Realm/RealmCutout.tsx similarity index 100% rename from src/shared/components/RealmCutout/RealmCutout.tsx rename to src/shared/components/Realm/RealmCutout.tsx diff --git a/src/shared/components/RealmCutout/RealmPin.tsx b/src/shared/components/Realm/RealmPin.tsx similarity index 100% rename from src/shared/components/RealmCutout/RealmPin.tsx rename to src/shared/components/Realm/RealmPin.tsx diff --git a/src/shared/components/RealmCutout/index.ts b/src/shared/components/Realm/index.ts similarity index 100% rename from src/shared/components/RealmCutout/index.ts rename to src/shared/components/Realm/index.ts diff --git a/src/shared/components/Transactions/TransactionProgress.tsx b/src/shared/components/Transactions/TransactionProgress.tsx index 6e1ac3f82..9950c73e0 100644 --- a/src/shared/components/Transactions/TransactionProgress.tsx +++ b/src/shared/components/Transactions/TransactionProgress.tsx @@ -4,7 +4,7 @@ import iconNotifWrong from "shared/assets/icons/m/notif-wrong.svg" import { TransactionProgressStatus } from "shared/types" import classNames from "classnames" import { isTransactionPending } from "shared/utils" -import Button from "../DOMElements/Button" +import Button from "../Interface/Button" import Ripple from "../Loaders/Ripple" import Icon from "../Media/Icon" diff --git a/src/shared/components/Transactions/TransactionsModal.tsx b/src/shared/components/Transactions/TransactionsModal.tsx index daf3d69c1..38d79fad3 100644 --- a/src/shared/components/Transactions/TransactionsModal.tsx +++ b/src/shared/components/Transactions/TransactionsModal.tsx @@ -1,6 +1,6 @@ import React from "react" // import { isTransactionPending } from "shared/utils" -import Modal from "../Modal" +import Modal from "../Dialogs/Modal" import TransactionProgress, { TransactionProgressProps, } from "./TransactionProgress" diff --git a/src/ui/Assistant/index.tsx b/src/ui/Assistant/index.tsx index cdceb350f..a7db01dd0 100644 --- a/src/ui/Assistant/index.tsx +++ b/src/ui/Assistant/index.tsx @@ -1,7 +1,7 @@ import React, { useEffect } from "react" import Icon from "shared/components/Media/Icon" import assistantImage from "shared/assets/assistant.png" -import Portal from "shared/components/DOMElements/Portal" +import Portal from "shared/components/Interface/Portal" import { useAssistant } from "shared/hooks" import AssistantWelcome from "./AssistantContent/AssistantWelcome" import AssistantChallenges from "./AssistantContent/AssistantChallenges" diff --git a/src/ui/Claim/ClaimAlreadyClaimed.tsx b/src/ui/Claim/ClaimAlreadyClaimed.tsx index 930c61e48..b3c3cb290 100644 --- a/src/ui/Claim/ClaimAlreadyClaimed.tsx +++ b/src/ui/Claim/ClaimAlreadyClaimed.tsx @@ -1,8 +1,8 @@ import React from "react" import { useHistory } from "react-router-dom" -import Button from "shared/components/DOMElements/Button" -import Modal from "shared/components/Modal" -import TahoAmount from "shared/components/TahoAmount" +import Button from "shared/components/Interface/Button" +import Modal from "shared/components/Dialogs/Modal" +import TahoAmount from "shared/components/Interface/TahoAmount" import { useDappSelector, selectEligibility } from "redux-state" import { ROUTES } from "shared/constants" import ClaimHeader from "./components/ClaimHeader" diff --git a/src/ui/Claim/ClaimCheck.tsx b/src/ui/Claim/ClaimCheck.tsx index 0400d53c4..debbe95b7 100644 --- a/src/ui/Claim/ClaimCheck.tsx +++ b/src/ui/Claim/ClaimCheck.tsx @@ -2,8 +2,8 @@ import React, { useEffect, useState } from "react" import classNames from "classnames" import { Redirect } from "react-router-dom" import { useDebounce } from "shared/hooks/helpers" -import Button from "shared/components/DOMElements/Button" -import Modal from "shared/components/Modal" +import Button from "shared/components/Interface/Button" +import Modal from "shared/components/Dialogs/Modal" import Spinner from "shared/components/Loaders/Spinner" import { isProbablyEVMAddress, resolveNameToAddress } from "shared/utils" import { diff --git a/src/ui/Claim/ClaimCheckFail.tsx b/src/ui/Claim/ClaimCheckFail.tsx index 44d3453d1..d6a2f6b63 100644 --- a/src/ui/Claim/ClaimCheckFail.tsx +++ b/src/ui/Claim/ClaimCheckFail.tsx @@ -1,7 +1,7 @@ import React from "react" import { useHistory } from "react-router-dom" -import Button from "shared/components/DOMElements/Button" -import Modal from "shared/components/Modal" +import Button from "shared/components/Interface/Button" +import Modal from "shared/components/Dialogs/Modal" import { useDappDispatch, useDappSelector, diff --git a/src/ui/Claim/ClaimCheckSuccess.tsx b/src/ui/Claim/ClaimCheckSuccess.tsx index 0fef946d6..dda1b2aed 100644 --- a/src/ui/Claim/ClaimCheckSuccess.tsx +++ b/src/ui/Claim/ClaimCheckSuccess.tsx @@ -1,9 +1,9 @@ import React from "react" import { useHistory } from "react-router-dom" -import Modal from "shared/components/Modal" -import TahoAmount from "shared/components/TahoAmount" +import Modal from "shared/components/Dialogs/Modal" +import TahoAmount from "shared/components/Interface/TahoAmount" import iconConnected from "shared/assets/icons/s/connected.svg" -import Button from "shared/components/DOMElements/Button" +import Button from "shared/components/Interface/Button" import { useConnect } from "shared/hooks" import { useDappSelector, diff --git a/src/ui/Claim/ClaimFinish.tsx b/src/ui/Claim/ClaimFinish.tsx index f05a7e704..09bad7c43 100644 --- a/src/ui/Claim/ClaimFinish.tsx +++ b/src/ui/Claim/ClaimFinish.tsx @@ -1,8 +1,8 @@ import React from "react" import { useHistory } from "react-router-dom" -import TahoAmount from "shared/components/TahoAmount" -import Button from "shared/components/DOMElements/Button" -import Modal from "shared/components/Modal" +import TahoAmount from "shared/components/Interface/TahoAmount" +import Button from "shared/components/Interface/Button" +import Modal from "shared/components/Dialogs/Modal" import { useDappSelector, selectEligibility } from "redux-state" import { ROUTES } from "shared/constants" import ClaimHeader from "./components/ClaimHeader" diff --git a/src/ui/Claim/modals/ClaimCongratulations.tsx b/src/ui/Claim/modals/ClaimCongratulations.tsx index 2df6b9f26..73514e417 100644 --- a/src/ui/Claim/modals/ClaimCongratulations.tsx +++ b/src/ui/Claim/modals/ClaimCongratulations.tsx @@ -1,6 +1,6 @@ import React from "react" import { selectRealmById, useDappSelector } from "redux-state" -import Button from "shared/components/DOMElements/Button" +import Button from "shared/components/Interface/Button" import CongratulationsModal from "ui/Island/Modals/CongratulationsModal" import RealmIcon from "ui/Island/Realms/RealmIcon" diff --git a/src/ui/Claim/subpages/ClaimingDelegate.tsx b/src/ui/Claim/subpages/ClaimingDelegate.tsx index cdc88492e..7f0b47499 100644 --- a/src/ui/Claim/subpages/ClaimingDelegate.tsx +++ b/src/ui/Claim/subpages/ClaimingDelegate.tsx @@ -5,7 +5,7 @@ import React, { useState } from "react" import { useHistory } from "react-router-dom" import classNames from "classnames" -import Button from "shared/components/DOMElements/Button" +import Button from "shared/components/Interface/Button" import Icon from "shared/components/Media/Icon" import iconNotifCorrect from "shared/assets/icons/s/notif-correct.svg" import iconSearch from "shared/assets/icons/m/search.svg" diff --git a/src/ui/Claim/subpages/ClaimingFlow.tsx b/src/ui/Claim/subpages/ClaimingFlow.tsx index da2bb57b2..0dc9fe4b0 100644 --- a/src/ui/Claim/subpages/ClaimingFlow.tsx +++ b/src/ui/Claim/subpages/ClaimingFlow.tsx @@ -1,6 +1,6 @@ import React from "react" import { Redirect, Route, Switch } from "react-router-dom" -import Modal from "shared/components/Modal" +import Modal from "shared/components/Dialogs/Modal" import { ROUTES } from "shared/constants" import ClaimingPledge from "./ClaimingPledge" import ClaimingSignTx from "./ClaimingSignTx" diff --git a/src/ui/Claim/subpages/ClaimingPledge.tsx b/src/ui/Claim/subpages/ClaimingPledge.tsx index 57b41e24a..621383baa 100644 --- a/src/ui/Claim/subpages/ClaimingPledge.tsx +++ b/src/ui/Claim/subpages/ClaimingPledge.tsx @@ -1,6 +1,6 @@ import React from "react" import { useHistory } from "react-router-dom" -import Button from "shared/components/DOMElements/Button" +import Button from "shared/components/Interface/Button" import Icon from "shared/components/Media/Icon" import earthIcon from "shared/assets/icons/earth.svg" import communityIcon from "shared/assets/icons/community.svg" diff --git a/src/ui/Claim/subpages/ClaimingSignTx.tsx b/src/ui/Claim/subpages/ClaimingSignTx.tsx index c7b2d47cd..d5c9a87d8 100644 --- a/src/ui/Claim/subpages/ClaimingSignTx.tsx +++ b/src/ui/Claim/subpages/ClaimingSignTx.tsx @@ -1,6 +1,6 @@ import React, { useState } from "react" import Icon from "shared/components/Media/Icon" -import Button from "shared/components/DOMElements/Button" +import Button from "shared/components/Interface/Button" import lockIcon from "shared/assets/icons/s/lock.svg" import ClaimingTransactions from "./ClaimingTransactions" diff --git a/src/ui/Claim/subpages/ClaimingStats.tsx b/src/ui/Claim/subpages/ClaimingStats.tsx index ca7e6dd6f..de694884a 100644 --- a/src/ui/Claim/subpages/ClaimingStats.tsx +++ b/src/ui/Claim/subpages/ClaimingStats.tsx @@ -1,11 +1,11 @@ import React from "react" -import TahoAmount from "shared/components/TahoAmount" -import Modal from "shared/components/Modal" +import TahoAmount from "shared/components/Interface/TahoAmount" +import Modal from "shared/components/Dialogs/Modal" import Icon from "shared/components/Media/Icon" import infoIcon from "shared/assets/icons/m/info.svg" -import Accordion from "shared/components/DOMElements/Accordion" +import Accordion from "shared/components/Interface/Accordion" import { useDappSelector, selectEligibility } from "redux-state" -import { RealmCutout } from "shared/components/RealmCutout" +import { RealmCutout } from "shared/components/Realm" import ClaimCheckRules from "../components/ClaimCheckRules" const MOCK_REALM = { diff --git a/src/ui/Claim/subpages/index.tsx b/src/ui/Claim/subpages/index.tsx index 7c34f5329..862ab3bcc 100644 --- a/src/ui/Claim/subpages/index.tsx +++ b/src/ui/Claim/subpages/index.tsx @@ -1,5 +1,5 @@ import React from "react" -import Modal from "shared/components/Modal" +import Modal from "shared/components/Dialogs/Modal" import { selectIsJoinRealmIslandMode } from "redux-state/selectors/island" import { useDappSelector } from "redux-state" import ClaimingStats from "./ClaimingStats" diff --git a/src/ui/Controls/index.tsx b/src/ui/Controls/index.tsx index 02d6bfad7..dccd78414 100644 --- a/src/ui/Controls/index.tsx +++ b/src/ui/Controls/index.tsx @@ -1,5 +1,5 @@ import React from "react" -import Portal from "shared/components/DOMElements/Portal" +import Portal from "shared/components/Interface/Portal" import { Stage } from "konva/lib/Stage" import ZoomControls from "./ZoomControls" import IslandControl from "./IslandControl" diff --git a/src/ui/DApps/DesktopDApp.tsx b/src/ui/DApps/DesktopDApp.tsx index d82b39bfc..fdc908e7c 100644 --- a/src/ui/DApps/DesktopDApp.tsx +++ b/src/ui/DApps/DesktopDApp.tsx @@ -16,7 +16,7 @@ import { useWalletOnboarding, } from "shared/hooks" import Onboarding from "ui/Onboarding" -import PrivacyPolicy from "../../shared/components/PrivacyPolicy" +import PrivacyPolicy from "../../shared/components/Misc/PrivacyPolicy" import IslandView from "./IslandView" function DesktopDAppContent() { diff --git a/src/ui/Footer/index.tsx b/src/ui/Footer/index.tsx index 1bb5151c8..61eb0ba3a 100644 --- a/src/ui/Footer/index.tsx +++ b/src/ui/Footer/index.tsx @@ -1,6 +1,6 @@ import React from "react" // import ClaimProgressBar from "./ClaimProgressBar" // not used at the moment -import Version from "shared/components/Version" +import Version from "shared/components/Misc/Version" import RealmsBar from "./RealmBar" import FooterLinks from "./FooterLinks" import FooterWrapper from "./FooterWrapper" diff --git a/src/ui/Island/Modals/CongratulationsModal.tsx b/src/ui/Island/Modals/CongratulationsModal.tsx index 97c145f28..85f8c75d6 100644 --- a/src/ui/Island/Modals/CongratulationsModal.tsx +++ b/src/ui/Island/Modals/CongratulationsModal.tsx @@ -1,6 +1,6 @@ import React, { ReactElement, ReactNode } from "react" -import Modal from "../../../shared/components/Modal" -import Button from "../../../shared/components/DOMElements/Button" +import Modal from "../../../shared/components/Dialogs/Modal" +import Button from "../../../shared/components/Interface/Button" type CongratulationsModalProps = { children: string | ReactNode diff --git a/src/ui/Island/Modals/ModalLeavingRealm.tsx b/src/ui/Island/Modals/ModalLeavingRealm.tsx index 05293f893..e50cda134 100644 --- a/src/ui/Island/Modals/ModalLeavingRealm.tsx +++ b/src/ui/Island/Modals/ModalLeavingRealm.tsx @@ -1,8 +1,8 @@ import React from "react" -import Modal from "shared/components/Modal" +import Modal from "shared/components/Dialogs/Modal" import Icon from "shared/components/Media/Icon" import lightIcon from "shared/assets/icons/m/light.svg" -import Button from "shared/components/DOMElements/Button" +import Button from "shared/components/Interface/Button" import TransactionProgress, { TransactionProgressProps, diff --git a/src/ui/Island/Modals/OnboardingModal.tsx b/src/ui/Island/Modals/OnboardingModal.tsx index f2299bea6..b2780ab54 100644 --- a/src/ui/Island/Modals/OnboardingModal.tsx +++ b/src/ui/Island/Modals/OnboardingModal.tsx @@ -1,6 +1,6 @@ import React, { ReactNode } from "react" -import Modal from "../../../shared/components/Modal" -import Button from "../../../shared/components/DOMElements/Button" +import Modal from "../../../shared/components/Dialogs/Modal" +import Button from "../../../shared/components/Interface/Button" type OnboardingModalProps = { children: ReactNode diff --git a/src/ui/Island/RealmPanel/RealmDetailsPanel/RealmDetailsChallengeItem.tsx b/src/ui/Island/RealmPanel/RealmDetailsPanel/RealmDetailsChallengeItem.tsx index 68ee18b45..88621e5c6 100644 --- a/src/ui/Island/RealmPanel/RealmDetailsPanel/RealmDetailsChallengeItem.tsx +++ b/src/ui/Island/RealmPanel/RealmDetailsPanel/RealmDetailsChallengeItem.tsx @@ -1,6 +1,6 @@ import React, { useCallback } from "react" import Markdown from "react-markdown" -import Accordion from "shared/components/DOMElements/Accordion" +import Accordion from "shared/components/Interface/Accordion" import { useDisplayedChallenges } from "shared/hooks" type RealmDetailsChallengeItemProps = { diff --git a/src/ui/Island/RealmPanel/RealmDetailsPanel/RealmDetailsContent.tsx b/src/ui/Island/RealmPanel/RealmDetailsPanel/RealmDetailsContent.tsx index c0d54660a..81b6dc6fa 100644 --- a/src/ui/Island/RealmPanel/RealmDetailsPanel/RealmDetailsContent.tsx +++ b/src/ui/Island/RealmPanel/RealmDetailsPanel/RealmDetailsContent.tsx @@ -1,5 +1,5 @@ import React from "react" -import Panel from "shared/components/Panel" +import Panel from "shared/components/Dialogs/Panel" import { RootState } from "redux-state/reducers" import { selectDisplayedRealmId, diff --git a/src/ui/Island/RealmPanel/RealmDetailsPanel/RealmDetailsJoin.tsx b/src/ui/Island/RealmPanel/RealmDetailsPanel/RealmDetailsJoin.tsx index 05be23619..a1355fed8 100644 --- a/src/ui/Island/RealmPanel/RealmDetailsPanel/RealmDetailsJoin.tsx +++ b/src/ui/Island/RealmPanel/RealmDetailsPanel/RealmDetailsJoin.tsx @@ -1,5 +1,5 @@ import React from "react" -import Button from "shared/components/DOMElements/Button" +import Button from "shared/components/Interface/Button" import Icon from "shared/components/Media/Icon" import lightIcon from "shared/assets/icons/m/light.svg" diff --git a/src/ui/Island/RealmPanel/RealmDetailsPanel/RealmDetailsRewards.tsx b/src/ui/Island/RealmPanel/RealmDetailsPanel/RealmDetailsRewards.tsx index 694a2258d..83b9bc5f5 100644 --- a/src/ui/Island/RealmPanel/RealmDetailsPanel/RealmDetailsRewards.tsx +++ b/src/ui/Island/RealmPanel/RealmDetailsPanel/RealmDetailsRewards.tsx @@ -7,7 +7,7 @@ import { selectUnclaimedXpSumById, useDappSelector, } from "redux-state" -import Button from "shared/components/DOMElements/Button" +import Button from "shared/components/Interface/Button" import RealmIcon from "ui/Island/Realms/RealmIcon" import Tooltip from "shared/components/Dialogs/Tooltip" import { LINKS } from "shared/constants" diff --git a/src/ui/Island/RealmPanel/RealmLeaderboardPanel/index.tsx b/src/ui/Island/RealmPanel/RealmLeaderboardPanel/index.tsx index 71cf2417b..8ce80d9fb 100644 --- a/src/ui/Island/RealmPanel/RealmLeaderboardPanel/index.tsx +++ b/src/ui/Island/RealmPanel/RealmLeaderboardPanel/index.tsx @@ -1,6 +1,6 @@ import React, { useState } from "react" -import Panel from "shared/components/Panel" -import TabPanel from "shared/components/DOMElements/TabPanel" +import Panel from "shared/components/Dialogs/Panel" +import TabPanel from "shared/components/Interface/TabPanel" import LeaderboardList from "ui/Island/Leaderboard" import LeaderboardCurrentUser from "ui/Island/Leaderboard/LeaderboardCurrentUser" diff --git a/src/ui/Island/RealmPanel/RealmPanelAccordion/StakeUnstakeSection.tsx b/src/ui/Island/RealmPanel/RealmPanelAccordion/StakeUnstakeSection.tsx index f24d0469e..a518e58e0 100644 --- a/src/ui/Island/RealmPanel/RealmPanelAccordion/StakeUnstakeSection.tsx +++ b/src/ui/Island/RealmPanel/RealmPanelAccordion/StakeUnstakeSection.tsx @@ -7,10 +7,10 @@ import { useDappSelector, } from "redux-state" import { TAHO_ADDRESS } from "shared/constants" -import TabPanel from "shared/components/DOMElements/TabPanel" +import TabPanel from "shared/components/Interface/TabPanel" import StakeForm from "ui/Island/Staking/StakeForm" import UnstakeForm from "ui/Island/Staking/UnstakeForm" -import { AccordionOutsideActions } from "shared/components/DOMElements/Accordion" +import { AccordionOutsideActions } from "shared/components/Interface/Accordion" import RealmPanelAccordion from "." function isFormDisabled( diff --git a/src/ui/Island/RealmPanel/RealmPanelAccordion/index.tsx b/src/ui/Island/RealmPanel/RealmPanelAccordion/index.tsx index ece861bcb..73319995d 100644 --- a/src/ui/Island/RealmPanel/RealmPanelAccordion/index.tsx +++ b/src/ui/Island/RealmPanel/RealmPanelAccordion/index.tsx @@ -2,7 +2,7 @@ import React from "react" import { selectRealmPanelVisible, useDappSelector } from "redux-state" import Accordion, { CommonAccordion, -} from "shared/components/DOMElements/Accordion" +} from "shared/components/Interface/Accordion" export default function RealmDetailsAccordion({ title, diff --git a/src/ui/Island/RealmPanel/RealmPanelCloseButton.tsx b/src/ui/Island/RealmPanel/RealmPanelCloseButton.tsx index e067f75d3..6949ea45a 100644 --- a/src/ui/Island/RealmPanel/RealmPanelCloseButton.tsx +++ b/src/ui/Island/RealmPanel/RealmPanelCloseButton.tsx @@ -2,7 +2,7 @@ import React from "react" import closeIcon from "shared/assets/icons/s/close-black.svg" import { animated } from "@react-spring/web" import { useRealmCloseButtonTransition } from "shared/hooks" -import Button from "../../../shared/components/DOMElements/Button" +import Button from "../../../shared/components/Interface/Button" export default function RealmPanelCloseButton({ onClose, diff --git a/src/ui/Island/RealmPanel/index.tsx b/src/ui/Island/RealmPanel/index.tsx index ba6e7978b..69cfa0a6f 100644 --- a/src/ui/Island/RealmPanel/index.tsx +++ b/src/ui/Island/RealmPanel/index.tsx @@ -9,7 +9,7 @@ import RealmDetailsPanel from "./RealmDetailsPanel" import RealmLeaderboardPanel from "./RealmLeaderboardPanel" import RealmPanelCountdown from "./RealmPanelCountdown" import RealmPanelCloseButton from "./RealmPanelCloseButton" -import Panel from "../../../shared/components/Panel" +import Panel from "../../../shared/components/Dialogs/Panel" export default function RealmPanel({ onClose }: { onClose: () => void }) { const { updateAssistant } = useAssistant() diff --git a/src/ui/Island/Realms/Realm.tsx b/src/ui/Island/Realms/Realm.tsx index 37639fe4f..924cc727c 100644 --- a/src/ui/Island/Realms/Realm.tsx +++ b/src/ui/Island/Realms/Realm.tsx @@ -18,7 +18,7 @@ import { useIslandRealmsPaths, usePopulationBubble, } from "shared/hooks" -import { BUBBLE_CONFIG } from "shared/components/RealmCutout/Bubble" +import { BUBBLE_CONFIG } from "shared/components/Realm/Bubble" import { selectDisplayedRealmId, selectRealmPanelVisible, diff --git a/src/ui/Island/Staking/StakeCongratulationsModal.tsx b/src/ui/Island/Staking/StakeCongratulationsModal.tsx index efcc1762d..6731a6b5c 100644 --- a/src/ui/Island/Staking/StakeCongratulationsModal.tsx +++ b/src/ui/Island/Staking/StakeCongratulationsModal.tsx @@ -4,9 +4,9 @@ import { useDappSelector, selectDisplayedRealmId, } from "redux-state" -import Button from "shared/components/DOMElements/Button" +import Button from "shared/components/Interface/Button" import CongratulationsModal from "ui/Island/Modals/CongratulationsModal" -import { RealmCutout } from "shared/components/RealmCutout" +import { RealmCutout } from "shared/components/Realm" type StakeCongratulationsModalProps = { isOpen: boolean diff --git a/src/ui/Island/Staking/StakeForm.tsx b/src/ui/Island/Staking/StakeForm.tsx index f036d85d7..3874d78b3 100644 --- a/src/ui/Island/Staking/StakeForm.tsx +++ b/src/ui/Island/Staking/StakeForm.tsx @@ -1,5 +1,5 @@ import React, { useCallback, useEffect, useState } from "react" -import TokenAmountInput from "shared/components/DOMElements/TokenAmountInput" +import TokenAmountInput from "shared/components/Interface/TokenAmountInput" import TransactionsModal from "shared/components/Transactions/TransactionsModal" import { stakeTaho, diff --git a/src/ui/Island/Staking/UnstakeForm.tsx b/src/ui/Island/Staking/UnstakeForm.tsx index 422965e21..97ce14793 100644 --- a/src/ui/Island/Staking/UnstakeForm.tsx +++ b/src/ui/Island/Staking/UnstakeForm.tsx @@ -1,5 +1,5 @@ import React, { useCallback, useEffect, useState } from "react" -import TokenAmountInput from "shared/components/DOMElements/TokenAmountInput" +import TokenAmountInput from "shared/components/Interface/TokenAmountInput" import TransactionsModal from "shared/components/Transactions/TransactionsModal" import { useDappDispatch, diff --git a/src/ui/LiquidityPool/index.tsx b/src/ui/LiquidityPool/index.tsx index 5d72b646b..7730b4734 100644 --- a/src/ui/LiquidityPool/index.tsx +++ b/src/ui/LiquidityPool/index.tsx @@ -9,9 +9,9 @@ import { } from "redux-state" import { isValidInputAmount } from "shared/utils" import { useArbitrumProvider } from "shared/hooks" -import Button from "shared/components/DOMElements/Button" -import Modal from "shared/components/Modal" -import TokenAmountInput from "shared/components/DOMElements/TokenAmountInput" +import Button from "shared/components/Interface/Button" +import Modal from "shared/components/Dialogs/Modal" +import TokenAmountInput from "shared/components/Interface/TokenAmountInput" import { ETH_ADDRESS, TAHO_ADDRESS } from "shared/constants" const LP_TX_ID = "joinLP" diff --git a/src/ui/Nav/AccountDropdown.tsx b/src/ui/Nav/AccountDropdown.tsx index 98ab702f6..57616db5c 100644 --- a/src/ui/Nav/AccountDropdown.tsx +++ b/src/ui/Nav/AccountDropdown.tsx @@ -1,6 +1,6 @@ import React, { useEffect, useRef } from "react" import { useConnect } from "shared/hooks" -import Button from "shared/components/DOMElements/Button" +import Button from "shared/components/Interface/Button" import { useDappSelector, selectWalletName } from "redux-state" import Icon from "shared/components/Media/Icon" import disconnectIcon from "shared/assets/icons/m/disconnect.svg" diff --git a/src/ui/Nav/index.tsx b/src/ui/Nav/index.tsx index bbbbb2380..200387502 100644 --- a/src/ui/Nav/index.tsx +++ b/src/ui/Nav/index.tsx @@ -1,5 +1,5 @@ import React from "react" -import Button from "shared/components/DOMElements/Button" +import Button from "shared/components/Interface/Button" import logoIcon from "shared/assets/nav_logo.svg" import walletIcon from "shared/assets/icons/wallet.svg" import { useConnect, useResetTenderlyFork } from "shared/hooks" diff --git a/src/ui/Onboarding/index.tsx b/src/ui/Onboarding/index.tsx index d7eebf3ba..d76fac4ea 100644 --- a/src/ui/Onboarding/index.tsx +++ b/src/ui/Onboarding/index.tsx @@ -8,7 +8,7 @@ import { import FullPageLoader from "shared/components/Loaders/FullPageLoader" import Nav from "ui/Nav" import portalBackground from "shared/assets/portal-background.mp4" -import Version from "shared/components/Version" +import Version from "shared/components/Misc/Version" import OnboardingFooter from "ui/Footer/OnboardingFooter" import ConnectWallet from "./ConnectWallet" import JoinWaitlist from "./JoinWaitlist" diff --git a/src/ui/Referrals/index.tsx b/src/ui/Referrals/index.tsx index 9ad7ca704..3403d8a98 100644 --- a/src/ui/Referrals/index.tsx +++ b/src/ui/Referrals/index.tsx @@ -1,9 +1,9 @@ import React from "react" import { useConnect } from "shared/hooks" -import TahoAmount from "shared/components/TahoAmount" -import Button from "shared/components/DOMElements/Button" +import TahoAmount from "shared/components/Interface/TahoAmount" +import Button from "shared/components/Interface/Button" import Icon from "shared/components/Media/Icon" -import Modal from "shared/components/Modal" +import Modal from "shared/components/Dialogs/Modal" import eyeIcon from "shared/assets/icons/m/eye.svg" import twitterIcon from "shared/assets/icons/twitter.svg" import copyIcon from "shared/assets/icons/s/copy.svg"