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 01/10] 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 02/10] 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 03/10] 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 ddaa4922a48d34fe0825b094441a104d3091737a Mon Sep 17 00:00:00 2001 From: Jagoda Berry Rybacka Date: Thu, 7 Dec 2023 08:16:43 +0100 Subject: [PATCH 04/10] Add boost to the XP allocatable --- .../RealmPanel/RealmDetailsPanel/RealmDetailsHeader.tsx | 9 +++++++-- src/shared/constants/game.ts | 1 + 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/shared/components/RealmPanel/RealmDetailsPanel/RealmDetailsHeader.tsx b/src/shared/components/RealmPanel/RealmDetailsPanel/RealmDetailsHeader.tsx index 4bd8fab95..ccf125a15 100644 --- a/src/shared/components/RealmPanel/RealmDetailsPanel/RealmDetailsHeader.tsx +++ b/src/shared/components/RealmPanel/RealmDetailsPanel/RealmDetailsHeader.tsx @@ -6,7 +6,11 @@ import { getRadialGradientFromRealmColor, separateThousandsByComma, } from "shared/utils" -import { WEEKLY_XP_ALLOCATION, getRealmMapData } from "shared/constants" +import { + WEEKLY_XP_ALLOCATION, + WEEKLY_XP_BOOST, + getRealmMapData, +} from "shared/constants" import { RealmData } from "shared/types" import RealmDetailsSection from "./RealmDetailsSection" @@ -54,7 +58,8 @@ export default function RealmDetailsHeader({ /> {separateThousandsByComma( - /* realm.xpAllocatable || */ WEEKLY_XP_ALLOCATION, + /* realm.xpAllocatable || */ WEEKLY_XP_ALLOCATION * + WEEKLY_XP_BOOST, 0 )}{" "} XP diff --git a/src/shared/constants/game.ts b/src/shared/constants/game.ts index 88166a223..70877c573 100644 --- a/src/shared/constants/game.ts +++ b/src/shared/constants/game.ts @@ -1,4 +1,5 @@ export const WEEKLY_XP_ALLOCATION = 1_000_000 +export const WEEKLY_XP_BOOST = 1.2 export const MOBILE_BREAKPOINT = 854 export const TABLET_BREAKPOINT = 1152 export const XP_COMING_SOON_TEXT = "XP Drop coming soon" From da07b6cd4aed880855507dafc30a7dc4d789179b Mon Sep 17 00:00:00 2001 From: Jagoda Berry Rybacka Date: Thu, 7 Dec 2023 08:16:53 +0100 Subject: [PATCH 05/10] Add XP boost icon --- src/shared/assets/icons/xp-boost.svg | 61 +++++++++++++++++++ .../RealmPanel/RealmPanelCountdown.tsx | 25 +++++--- 2 files changed, 79 insertions(+), 7 deletions(-) create mode 100644 src/shared/assets/icons/xp-boost.svg diff --git a/src/shared/assets/icons/xp-boost.svg b/src/shared/assets/icons/xp-boost.svg new file mode 100644 index 000000000..24440f26b --- /dev/null +++ b/src/shared/assets/icons/xp-boost.svg @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/shared/components/RealmPanel/RealmPanelCountdown.tsx b/src/shared/components/RealmPanel/RealmPanelCountdown.tsx index eb26dcf0a..1b7addf59 100644 --- a/src/shared/components/RealmPanel/RealmPanelCountdown.tsx +++ b/src/shared/components/RealmPanel/RealmPanelCountdown.tsx @@ -6,6 +6,8 @@ import { useDappSelector, } from "redux-state" import { getNextSelectedWeekDay, getTimeRemaining } from "shared/utils" +import xpBoostIcon from "shared/assets/icons/xp-boost.svg" +import Icon from "../Icon" export default function RealmPanelCountdown() { const seasonWeek = useDappSelector(selectSeasonWeek) @@ -19,14 +21,23 @@ export default function RealmPanelCountdown() { return ( <> -
-
- Week {seasonWeek}{" "} - - / {seasonDuration} - +
+ +
+
+ Week {seasonWeek}{" "} + + / {seasonDuration} + +
+
{timeRemaining}
-
{timeRemaining}