Skip to content

Commit

Permalink
Adjust UI for end of beta period
Browse files Browse the repository at this point in the history
  • Loading branch information
jagodarybacka committed Dec 11, 2023
1 parent a74820d commit 968355f
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 18 deletions.
3 changes: 2 additions & 1 deletion src/shared/constants/game.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export const WEEKLY_XP_ALLOCATION = 1_000_000
export const WEEKLY_XP_ALLOCATION =
process.env.IS_BETA_CLOSED === "true" ? 0 : 1_000_000
export const WEEKLY_XP_BOOST = 1.2
export const MOBILE_BREAKPOINT = 854
export const TABLET_BREAKPOINT = 1152
Expand Down
21 changes: 15 additions & 6 deletions src/ui/Island/RealmPanel/RealmDetailsPanel/RealmDetailsContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,22 @@ export default function RealmDetailsContent({
return (
<Panel.Section>
<RealmDetailsHeader realmId={realmId} realm={realm} />
<RealmDetailsChallenges challenges={realm?.challenges} />
{process.env.IS_BETA_CLOSED === "true" || (
<RealmDetailsChallenges challenges={realm?.challenges} />
)}
<RealmDetailsRewards realmId={realmId} />
<RealmDetailsJoin
stakingRealmId={stakingRealmId}
triggerStakeSectionOpen={triggerStakeSectionOpen}
/>
<RealmDetailsStaked stakingRealmId={stakingRealmId} realmId={realmId} />
{process.env.IS_BETA_CLOSED === "true" || (
<>
<RealmDetailsJoin
stakingRealmId={stakingRealmId}
triggerStakeSectionOpen={triggerStakeSectionOpen}
/>
<RealmDetailsStaked
stakingRealmId={stakingRealmId}
realmId={realmId}
/>
</>
)}
</Panel.Section>
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ export default function RealmDetailsHeader({
<h1 className="realm_header" style={{ color }}>
{realm?.name} Realm
</h1>
<RealmDetailsSection alwaysHasBorder>
<RealmDetailsSection
alwaysHasBorder={process.env.IS_BETA_CLOSED !== "true"}
>
<div className="labels row">
<div className="column">
<span className="label row_center">
Expand All @@ -49,7 +51,10 @@ export default function RealmDetailsHeader({
</div>
<div className="column">
<span className="label">This weeks reward pool</span>
<div className="row_center" style={{ gap: 10 }}>
<div
className="row_center"
style={{ gap: 10, justifyContent: "end" }}
>
<RealmIcon
type="circle"
realmId={realmId}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { LINKS } from "shared/constants"
import { bigIntToDisplayUserAmount } from "shared/utils"
import ClaimCongratulations from "ui/Claim/modals/ClaimCongratulations"
import XpClaimModal from "ui/Island/Modals/XpClaimModal"
import RealmDetailsChallengeInfo from "./RealmDetailsChallengeInfo"

function RealmDetailsRewards({
amount,
Expand Down Expand Up @@ -97,6 +98,13 @@ function RealmDetailsRewards({
>
Claim XP
</Button>
{process.env.IS_BETA_CLOSED === "true" && (
<div style={{ marginTop: "10px" }}>
<RealmDetailsChallengeInfo>
Claiming will be live till Dec 18 2023
</RealmDetailsChallengeInfo>
</div>
)}
</div>
<XpClaimModal
isOpen={isClaimTransactionModalOpen}
Expand All @@ -122,7 +130,7 @@ function RealmDetailsRewards({
background-color: var(--primary-p1-40);
justify-content: space-between;
align-items: center;
gap: 24px;
flex-wrap: wrap;
}
.xp_banner {
gap: 8px;
Expand Down
23 changes: 15 additions & 8 deletions src/ui/Island/RealmPanel/RealmPanelCountdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,28 @@ export default function RealmPanelCountdown() {
return (
<>
<div className="countdown row">
<Icon
type="image"
src={xpBoostIcon}
width="125px"
height="64px"
style={{ marginTop: "10px" }}
/>
{process.env.IS_BETA_CLOSED === "true" || (
<Icon
type="image"
src={xpBoostIcon}
width="125px"
height="64px"
style={{ marginTop: "10px" }}
/>
)}
<div className="column">
<div className="week">
Week {seasonWeek}{" "}
<span style={{ fontSize: 16, color: "var(--secondary-s1-50)" }}>
/ {seasonDuration}
</span>
</div>
<div className="time_remaining">{timeRemaining}</div>

<div className="time_remaining">
{process.env.IS_BETA_CLOSED === "true"
? "Beta is over, claim xp till Dec 18 2023"
: timeRemaining}
</div>
</div>
</div>
<style jsx>{`
Expand Down
1 change: 1 addition & 0 deletions src/ui/Island/Staking/StakeForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ export default function StakeForm({ isDisabled }: { isDisabled: boolean }) {
buttonSize="medium"
status={stakeTransactionStatus}
disabled={
process.env.IS_BETA_CLOSED === "true" ||
isDisabled ||
!isStakeAmountValid ||
!isValidInputAmount(stakeAmount)
Expand Down

0 comments on commit 968355f

Please sign in to comment.