Skip to content

Commit

Permalink
fix: hide onboarding button when onboarding disabled (#1418)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomjeatt authored Jul 5, 2023
1 parent 9cbbd19 commit 8500c2d
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { Flex } from '@/component-library';
import { INTERLAY_GET_ASSETS_LINK, INTERLAY_WHITEPAPPER } from '@/config/links';
import { APP_NAME, WRAPPED_TOKEN } from '@/config/relay-chains';
import { PAGES } from '@/utils/constants/links';
import { FeatureFlags, useFeatureFlag } from '@/utils/hooks/use-feature-flag';

import {
StyledCard,
Expand All @@ -24,6 +25,7 @@ type WelcomeBannerProps = {

const WelcomeBanner = ({ onClose }: WelcomeBannerProps): JSX.Element => {
const { t } = useTranslation();
const isOnboardingEnabled = useFeatureFlag(FeatureFlags.ONBOARDING);

return (
<StyledCard direction='row' gap='spacing4' justifyContent='space-between' alignItems='center'>
Expand All @@ -46,9 +48,11 @@ const WelcomeBanner = ({ onClose }: WelcomeBannerProps): JSX.Element => {
<StyledCTALink fullWidth external icon to={INTERLAY_GET_ASSETS_LINK}>
Fund Wallet Guide
</StyledCTALink>
<StyledCTALink fullWidth to={PAGES.ONBOARDING}>
Tutorial
</StyledCTALink>
{isOnboardingEnabled && (
<StyledCTALink fullWidth to={PAGES.ONBOARDING}>
Tutorial
</StyledCTALink>
)}
</StyledCTAGroup>
</StyledTextWrapper>
<StyledImageWrapper>
Expand Down

2 comments on commit 8500c2d

@vercel
Copy link

@vercel vercel bot commented on 8500c2d Jul 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on 8500c2d Jul 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.