Skip to content

Commit

Permalink
feature flag out liquidity visualiser
Browse files Browse the repository at this point in the history
  • Loading branch information
eli-d committed Jun 20, 2024
1 parent 67f8996 commit 800c196
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions web/src/app/_layout/FeatureFlagConfig.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ const featureFlagsLabels: { [K in FeatureFlagKey]: string } = {
"ui show pools tab": "UI Show Pools Tab",
"ui show swap breakdown": "UI Show Swap Breakdown",
"ui show tokens given out": "UI Show Tokens Given Out",
"ui show liquidity visualiser": "UI Show Liquidity Visualiser",
};

export const FeatureFlagConfig = () => {
Expand Down
5 changes: 3 additions & 2 deletions web/src/components/StakeForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ export const StakeForm = ({ mode, poolId, positionId }: StakeFormProps) => {
const showDynamicFeesPopup = useFeatureFlag("ui show optimising fee route");
const showSingleToken = useFeatureFlag("ui show single token stake");
const showCampaignBanner = useFeatureFlag("ui show campaign banner");
const showLiquidityVisualiser = useFeatureFlag("ui show liquidity visualiser")

const onSubmit = () => {
if (mode === "new") {
Expand Down Expand Up @@ -797,7 +798,7 @@ export const StakeForm = ({ mode, poolId, positionId }: StakeFormProps) => {
</div>
</div>

<div className="mt-[22px]">
{showLiquidityVisualiser && <div className="mt-[22px]">
<div className="text-3xs text-gray-2 md:text-2xs">Visualiser</div>
<ReactECharts
className="mt-1"
Expand Down Expand Up @@ -836,7 +837,7 @@ export const StakeForm = ({ mode, poolId, positionId }: StakeFormProps) => {
<LiquidityDistribution /> Liquidity Distribution
</div>
</div>
</div>
</div> }
</div>

<div className="mt-[21px] flex w-[318px] flex-row justify-end md:w-[392px]">
Expand Down
5 changes: 5 additions & 0 deletions web/src/hooks/useFeatureFlag.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,11 @@ export interface FeatureFlags {
* Show breakdown of fees, rewards, and route in the swap form.
*/
"ui show swap breakdown": boolean;

/**
* Show liquidity range visualiser in the stake form
*/
"ui show liquidity visualiser": boolean;
}

/**
Expand Down

0 comments on commit 800c196

Please sign in to comment.