-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🪄 [QA] Update stage environments (#701)
This is a pull request that upon merging will update stage environments with recent `main` changes. The environments that will be updated: * Stage live: https://stage-live--taho-development.netlify.app/ * Stage fork: https://stage-fork--taho-development.netlify.app/ Read more: [Deployment to Production Flow](https://github.com/tahowallet/dapp/blob/main/docs/testing-env.md)
- Loading branch information
Showing
42 changed files
with
775 additions
and
232 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { RealmData } from "shared/types" | ||
|
||
export const getPopulationOfRealms = (realms: RealmData[]) => | ||
realms.map((realm) => realm.population) | ||
|
||
export const getDisplayedPopulationOfRealms = (realms: RealmData[]) => | ||
realms.map((realm) => realm.displayedPopulation) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import { animated, easings, useSpring } from "@react-spring/web" | ||
import React, { useEffect, useState } from "react" | ||
import { getRealmPopulationIcon } from "shared/constants" | ||
import { usePopulationBubble } from "shared/hooks" | ||
|
||
export const STYLE = { | ||
default: { opacity: 0, transform: "translateY(150px)" }, | ||
highlight: { opacity: 1, transform: "translateY(50px)" }, | ||
} | ||
|
||
export const BUBBLE_CONFIG = { | ||
precision: 0.1, | ||
duration: 2000, | ||
easing: easings.easeOutCubic, | ||
} | ||
|
||
export default function Bubble({ realmId }: { realmId: string }) { | ||
const { showBubble, setShowBubble } = usePopulationBubble(realmId) | ||
|
||
const [iconSrc, setIconSrc] = useState<string | null>(null) | ||
|
||
useEffect(() => { | ||
const icon = getRealmPopulationIcon(realmId) | ||
setIconSrc(icon) | ||
}, [realmId]) | ||
|
||
const [bubbleProps] = useSpring( | ||
() => ({ | ||
from: STYLE.default, | ||
to: showBubble ? STYLE.highlight : STYLE.default, | ||
config: BUBBLE_CONFIG, | ||
onRest: () => setShowBubble(false), | ||
}), | ||
[showBubble] | ||
) | ||
|
||
if (!iconSrc) return null | ||
|
||
return ( | ||
<animated.div | ||
style={{ ...bubbleProps, left: "220px", position: "absolute", zIndex: 2 }} | ||
> | ||
<div> | ||
<img src={iconSrc} height={24} width={24} alt="Bubble" /> | ||
</div> | ||
</animated.div> | ||
) | ||
} |
Oops, something went wrong.