Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into develop-remove-fus…
Browse files Browse the repository at this point in the history
…dc-arb-earned
  • Loading branch information
user committed Apr 19, 2024
2 parents 506d55b + 072bd19 commit 8a89487
Show file tree
Hide file tree
Showing 21 changed files with 2,886 additions and 2,635 deletions.
43 changes: 29 additions & 14 deletions web/app.fluidity.money/app/routes/$network/dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -415,16 +415,17 @@ export default function Dashboard() {
const [hoverModal, setHoverModal] = useState(false);
const [showModal, setShowModal] = useState(false);

const [stakingStatsModalVisibility, setStakingStatsModalVisibility] = useState(false);
const [stakingStatsModalVisibility, setStakingStatsModalVisibility] =
useState(false);

// every change to this number asks flystakingmodal to look up the new balance
const [shouldUpdateFlyBalance, setShouldUpdateFlyBalance] = useState(0);

const otherModalOpen =
openMobModal ||
walletModalVisibility ||
connectedWalletModalVisibility ||
chainModalVisibility
walletModalVisibility ||
connectedWalletModalVisibility ||
chainModalVisibility
? true
: false;

Expand Down Expand Up @@ -500,8 +501,9 @@ export default function Dashboard() {
{/* Fluidify Money button, in a portal with z-index above tooltip if another modal isn't open */}
<Modal id="fluidify" visible={!otherModalOpen}>
<GeneralButton
className={`fluidify-button-dashboard-mobile rainbow ${otherModalOpen ? "z-0" : "z-1"
}`}
className={`fluidify-button-dashboard-mobile rainbow ${
otherModalOpen ? "z-0" : "z-1"
}`}
type={"secondary"}
size={"medium"}
handleClick={() => navigate("../fluidify")}
Expand Down Expand Up @@ -572,8 +574,13 @@ export default function Dashboard() {
})}
<li key="staking">
<div />
<a style={{ "cursor": "pointer" }} onClick={() => setStakingStatsModalVisibility(true)}>
<Text className="dashboard-navbar-default"><StakeIcon classname="staking-icon" /> STAKING</Text>
<a
style={{ cursor: "pointer" }}
onClick={() => setStakingStatsModalVisibility(true)}
>
<Text className="dashboard-navbar-default">
<StakeIcon classname="staking-icon" /> STAKING
</Text>
</a>
</li>
</ul>
Expand Down Expand Up @@ -759,20 +766,23 @@ export default function Dashboard() {
{/* FLY Staking Stats Modal */}
<FlyStakingStatsModal
staking={true}
close={() => { setStakingStatsModalVisibility(false) }}
close={() => {
setStakingStatsModalVisibility(false);
}}
showConnectWalletModal={() => setWalletModalVisibility(true)}
visible={stakingStatsModalVisibility}
shouldUpdateFlyBalance={shouldUpdateFlyBalance}
/>
<FlyStakingContext.Provider
value={{
toggleVisibility: setStakingStatsModalVisibility,
shouldUpdateBalance: () => setShouldUpdateFlyBalance((v) => v + 1)
shouldUpdateBalance: () => setShouldUpdateFlyBalance((v) => v + 1),
}}
>
<UIContext.Provider
value={{
toggleConnectWalletModal: () => setWalletModalVisibility((v) => !v),
toggleConnectWalletModal: () =>
setWalletModalVisibility((v) => !v),
}}
>
<Outlet />
Expand Down Expand Up @@ -911,8 +921,13 @@ export default function Dashboard() {
nonNavigationEntries={[
<li key="staking">
<div />
<a style={{ "cursor": "pointer" }} onClick={() => setStakingStatsModalVisibility(true)}>
<Text className="dashboard-navbar-default"><StakeIcon classname="staking-icon" /> STAKING</Text>
<a
style={{ cursor: "pointer" }}
onClick={() => setStakingStatsModalVisibility(true)}
>
<Text className="dashboard-navbar-default">
<StakeIcon classname="staking-icon" /> STAKING
</Text>
</a>
</li>,
<li key="ico">
Expand All @@ -927,7 +942,7 @@ export default function Dashboard() {
<FlyIcon /> GET FLY
</Text>
</a>
</li>
</li>,
]}
activeIndex={activeIndex}
chains={chainNameMap}
Expand Down
Loading

0 comments on commit 8a89487

Please sign in to comment.