Skip to content

Commit

Permalink
chore: track pair select & fix
Browse files Browse the repository at this point in the history
  • Loading branch information
0xApotheosis committed Jan 9, 2024
1 parent 52f72b4 commit bb54423
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/components/SelectPair.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ export const SelectPair = () => {
const navigate = useNavigate()
const switchIcon = useMemo(() => <FaArrowRightArrowLeft />, [])
const handleSubmit = useCallback(() => {
mixpanel?.track('Pair selected', {
'some key': 'some val',
})

navigate('/input')
}, [mixpanel, navigate])

Expand Down
2 changes: 1 addition & 1 deletion src/lib/mixpanelSingleton.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ let _mixPanel: typeof Mixpanel | undefined = undefined

// we need to be able to access this outside react
export const getMixPanel = (): MixPanelType | undefined => {
const mixPanelEnabled = import.meta.env.VITE_MIXPANEL_ENABLED
const mixPanelEnabled = import.meta.env.VITE_FEATURE_MIXPANEL
if (!mixPanelEnabled) return
if (_mixPanel) return _mixPanel
const mixpanelToken = import.meta.env.VITE_MIXPANEL_TOKEN
Expand Down

0 comments on commit bb54423

Please sign in to comment.