Skip to content

Commit

Permalink
fix: Remove SAP banner (#4414)
Browse files Browse the repository at this point in the history
* fix: Remove swap and SAP banner

* fix: Remove unused events
  • Loading branch information
usame-algan authored Oct 25, 2024
1 parent 097a59f commit 9227a7c
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 252 deletions.
137 changes: 0 additions & 137 deletions src/components/dashboard/ActivityRewardsSection/index.tsx

This file was deleted.

92 changes: 0 additions & 92 deletions src/components/dashboard/ActivityRewardsSection/styles.module.css

This file was deleted.

12 changes: 1 addition & 11 deletions src/components/dashboard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,10 @@ import Overview from '@/components/dashboard/Overview/Overview'
import SafeAppsDashboardSection from '@/components/dashboard/SafeAppsDashboardSection/SafeAppsDashboardSection'
import GovernanceSection from '@/components/dashboard/GovernanceSection/GovernanceSection'
import { useIsRecoverySupported } from '@/features/recovery/hooks/useIsRecoverySupported'
import ActivityRewardsSection from '@/components/dashboard/ActivityRewardsSection'
import StakingBanner from '@/components/dashboard/StakingBanner'
import { useHasFeature } from '@/hooks/useChains'
import { FEATURES } from '@/utils/chains'
import css from './styles.module.css'
import { useSafeTokenEnabled } from '@/hooks/useSafeTokenEnabled'
import { InconsistentSignerSetupWarning } from '@/features/multichain/components/SignerSetupWarning/InconsistentSignerSetupWarning'
import useIsStakingBannerEnabled from '@/features/stake/hooks/useIsStakingBannerEnabled'

Expand All @@ -23,8 +21,6 @@ const RecoveryHeader = dynamic(() => import('@/features/recovery/components/Reco
const Dashboard = (): ReactElement => {
const { safe } = useSafeInfo()
const showSafeApps = useHasFeature(FEATURES.SAFE_APPS)
const isSafeTokenEnabled = useSafeTokenEnabled()
const isSAPBannerEnabled = useHasFeature(FEATURES.SAP_BANNER) && isSafeTokenEnabled
const isStakingBannerEnabled = useIsStakingBannerEnabled()
const supportsRecovery = useIsRecoverySupported()

Expand All @@ -48,17 +44,11 @@ const Dashboard = (): ReactElement => {
{safe.deployed && (
<>
{isStakingBannerEnabled && (
<Grid item xs={12} xl={isSAPBannerEnabled ? 6 : 12} className={css.hideIfEmpty}>
<Grid item xs={12} className={css.hideIfEmpty}>
<StakingBanner large />
</Grid>
)}

{isSAPBannerEnabled && (
<Grid item xs className={css.hideIfEmpty}>
<ActivityRewardsSection />
</Grid>
)}

<Grid item xs={12} />

<Grid item xs={12} lg={6}>
Expand Down
12 changes: 0 additions & 12 deletions src/services/analytics/events/overview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,18 +162,6 @@ export const OVERVIEW_EVENTS = {
action: 'Proceed with transaction',
category: OVERVIEW_CATEGORY,
},
OPEN_ACTIVITY_APP: {
action: 'Open activity app from widget',
category: OVERVIEW_CATEGORY,
},
HIDE_ACTIVITY_APP_WIDGET: {
action: 'Hide activity app widget',
category: OVERVIEW_CATEGORY,
},
OPEN_LEARN_MORE_ACTIVITY_APP: {
action: 'Activity app learn more',
category: OVERVIEW_CATEGORY,
},
OPEN_STAKING_WIDGET: {
action: 'Open staking widget from banner',
category: OVERVIEW_CATEGORY,
Expand Down

0 comments on commit 9227a7c

Please sign in to comment.