From ddaa4922a48d34fe0825b094441a104d3091737a Mon Sep 17 00:00:00 2001 From: Jagoda Berry Rybacka Date: Thu, 7 Dec 2023 08:16:43 +0100 Subject: [PATCH 1/2] 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 2/2] 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}