Skip to content

Commit

Permalink
Merge branch 'master' into interlay
Browse files Browse the repository at this point in the history
* master:
  Feature flag (#1683)
  chore: release v2.41.16
  feature: bob x interlay (#1680)
  App alert banner (#1679)

# Conflicts:
#	src/App.tsx
#	src/pages/BOB/BOB.tsx
  • Loading branch information
tomjeatt committed Feb 26, 2025
2 parents 9e8fe57 + 0b520a3 commit 074874a
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 8 deletions.
9 changes: 6 additions & 3 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ const App = (): JSX.Element => {
const dispatch = useDispatch();
const isStrategiesEnabled = useFeatureFlag(FeatureFlags.STRATEGIES);
const isOnboardingEnabled = useFeatureFlag(FeatureFlags.ONBOARDING);
const isBobXInterlayEnabled = useFeatureFlag(FeatureFlags.BOB_X_INTERLAY);

// Detects if the connected account is a vault operator
const { error: vaultsError } = useQuery<GraphqlReturn<any>, Error>(
Expand Down Expand Up @@ -120,9 +121,11 @@ const App = (): JSX.Element => {
<Route path={PAGES.WALLET}>
<Wallet />
</Route>
<Route path={PAGES.BOB}>
<BOB />
</Route>
{isBobXInterlayEnabled && (
<Route path={PAGES.BOB}>
<BOB />
</Route>
)}
{isStrategiesEnabled && (
<>
<Route exact path={PAGES.STRATEGIES}>
Expand Down
6 changes: 4 additions & 2 deletions src/hooks/use-feature-flag.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
enum FeatureFlags {
STRATEGIES = 'strategies',
GEOBLOCK = 'geoblock',
ONBOARDING = 'onboarding'
ONBOARDING = 'onboarding',
BOB_X_INTERLAY = 'bob-x-interlay'
}

const featureFlags: Record<FeatureFlags, string | undefined> = {
[FeatureFlags.STRATEGIES]: process.env.REACT_APP_FEATURE_FLAG_STRATEGIES,
[FeatureFlags.GEOBLOCK]: process.env.REACT_APP_FEATURE_FLAG_GEOBLOCK,
[FeatureFlags.ONBOARDING]: process.env.REACT_APP_FEATURE_FLAG_ONBOARDING
[FeatureFlags.ONBOARDING]: process.env.REACT_APP_FEATURE_FLAG_ONBOARDING,
[FeatureFlags.BOB_X_INTERLAY]: process.env.REACT_APP_FEATURE_FLAG_BOB_X_INTERLAY
};

const useFeatureFlag = (feature: FeatureFlags): boolean => featureFlags[feature] === 'enabled';
Expand Down
9 changes: 6 additions & 3 deletions src/pages/BOB/BOB.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -150,14 +150,17 @@ const BOB = (): JSX.Element => {
<TextLink external to='http://app.gobob.xyz' underlined>
BOB
</TextLink>{' '}
x Interlay exclusive NFT badge today.
x Interlay exclusive NFT badge.
</P>
<P>
Only original Interlay community members are eligible. Simply submit the EVM address you&apos;d like
to receive the NFT and sign the transaction with your Interlay account to prove your community
status.
</P>
<P>We&apos;ll let you know in Interlay Discord when the NFT will be available to claim.</P>
<P>
Submit your Ethereum address below to register. We&apos;ll let you know in Interlay Discord when the NFT
is available to claim.
</P>
</Flex>
<form onSubmit={form.handleSubmit}>
<Flex direction='column' gap='spacing8'>
Expand All @@ -171,7 +174,7 @@ const BOB = (): JSX.Element => {
</Flex>
<Flex direction='column' gap='spacing4'>
<AuthCTA type='submit' size='large'>
Claim your NFT
Register your Ethereum address
</AuthCTA>
</Flex>
</Flex>
Expand Down

0 comments on commit 074874a

Please sign in to comment.