feat(trading): competition feature flag and team page (#5549)

This commit is contained in:
Matthew Russell 2023-12-29 15:50:51 +00:00 committed by GitHub
parent e7cb2c8276
commit 7fff33e493
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 25 additions and 0 deletions

View File

@ -25,3 +25,4 @@ NX_ICEBERG_ORDERS=true
# NX_PRODUCT_PERPETUALS
NX_METAMASK_SNAPS=true
NX_REFERRALS=true
NX_TEAM_COMPETITION=true

View File

@ -0,0 +1 @@
export { Teams } from './teams';

View File

@ -0,0 +1,7 @@
export const Teams = () => {
return (
<div>
<h1>Teams</h1>
</div>
);
};

View File

@ -14,6 +14,7 @@ import { Withdraw } from '../client-pages/withdraw';
import { Transfer } from '../client-pages/transfer';
import { Fees } from '../client-pages/fees';
import { Rewards } from '../client-pages/rewards';
import { Teams } from '../client-pages/teams';
import { Routes as AppRoutes } from '../lib/links';
import { LayoutWithSky } from '../client-pages/referrals/layout';
import { Referrals } from '../client-pages/referrals/referrals';
@ -92,6 +93,12 @@ export const useRouterConfig = (): RouteObject[] => {
],
}
: undefined,
featureFlags.TEAM_COMPETITION
? {
path: AppRoutes.TEAMS,
element: <Teams />,
}
: undefined,
{
path: 'fees/*',
element: <LayoutWithSidebar sidebar={<PortfolioSidebar />} />,
@ -176,6 +183,7 @@ export const useRouterConfig = (): RouteObject[] => {
},
],
},
{
path: '*',
element: <NotFound />,

View File

@ -368,6 +368,12 @@ export const compileFeatureFlags = (refresh = false): FeatureFlags => {
process.env['NX_VOLUME_DISCOUNTS']
) as string
),
TEAM_COMPETITION: TRUTHY.includes(
windowOrDefault(
'NX_TEAM_COMPETITION',
process.env['NX_TEAM_COMPETITION']
) as string
),
};
const EXPLORER_FLAGS = {

View File

@ -28,6 +28,7 @@ export type CosmicElevatorFlags = Pick<
| 'GOVERNANCE_TRANSFERS'
| 'VOLUME_DISCOUNTS'
| 'DISABLE_CLOSE_POSITION'
| 'TEAM_COMPETITION'
>;
export type Configuration = z.infer<typeof tomlConfigSchema>;
export const CUSTOM_NODE_KEY = 'custom' as const;

View File

@ -84,6 +84,7 @@ const COSMIC_ELEVATOR_FLAGS = {
GOVERNANCE_TRANSFERS: z.optional(z.boolean()),
VOLUME_DISCOUNTS: z.optional(z.boolean()),
DISABLE_CLOSE_POSITION: z.optional(z.boolean()),
TEAM_COMPETITION: z.optional(z.boolean()),
};
const EXPLORER_FLAGS = {