Skip to content

Commit

Permalink
fix: Remove event from SubAccountItem
Browse files Browse the repository at this point in the history
  • Loading branch information
usame-algan committed Oct 7, 2024
1 parent 0a874db commit 695803c
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/components/welcome/MyAccounts/SubAccountItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { ListItemButton, Box, Typography, Chip, Skeleton } from '@mui/material'
import Link from 'next/link'
import SafeIcon from '@/components/common/SafeIcon'
import Track from '@/components/common/Track'
import { OVERVIEW_EVENTS, OVERVIEW_LABELS, trackEvent } from '@/services/analytics'
import { OVERVIEW_EVENTS, OVERVIEW_LABELS } from '@/services/analytics'
import { AppRoutes } from '@/config/routes'
import { useAppSelector } from '@/store'
import { selectChainById } from '@/store/chainsSlice'
Expand Down Expand Up @@ -55,16 +55,11 @@ const SubAccountItem = ({ onLinkClick, safeItem, safeOverview }: SubAccountItem)

const cfSafeSetup = extractCounterfactualSafeSetup(undeployedSafe, chain?.chainId)

const onSwitchSafe = () => {
trackEvent({ ...OVERVIEW_EVENTS.SWITCH_NETWORK, label: chainId })
}

return (
<ListItemButton
data-testid="safe-list-item"
selected={isCurrentSafe}
className={classnames(css.listItem, { [css.currentListItem]: isCurrentSafe }, css.subItem)}
onClick={onSwitchSafe}
>
<Track {...OVERVIEW_EVENTS.OPEN_SAFE} label={trackingLabel}>
<Link onClick={onLinkClick} href={href} className={css.safeSubLink}>
Expand Down

0 comments on commit 695803c

Please sign in to comment.