Header menu open metric
This commit is contained in:
@@ -442,4 +442,5 @@ export type MetricEvents = {
|
|||||||
'thread:preferences:update': {
|
'thread:preferences:update': {
|
||||||
[key: string]: any
|
[key: string]: any
|
||||||
}
|
}
|
||||||
|
'thread:click:headerMenuOpen': {}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import {msg, Trans} from '@lingui/macro'
|
|||||||
import {useLingui} from '@lingui/react'
|
import {useLingui} from '@lingui/react'
|
||||||
|
|
||||||
import {HITSLOP_10} from '#/lib/constants'
|
import {HITSLOP_10} from '#/lib/constants'
|
||||||
|
import {logger} from '#/logger'
|
||||||
import {type ThreadPreferences} from '#/state/queries/preferences/useThreadPreferences'
|
import {type ThreadPreferences} from '#/state/queries/preferences/useThreadPreferences'
|
||||||
import {Button, ButtonIcon} from '#/components/Button'
|
import {Button, ButtonIcon} from '#/components/Button'
|
||||||
import {SettingsSliderVertical_Stroke2_Corner0_Rounded as SettingsSlider} from '#/components/icons/SettingsSlider'
|
import {SettingsSliderVertical_Stroke2_Corner0_Rounded as SettingsSlider} from '#/components/icons/SettingsSlider'
|
||||||
@@ -20,7 +21,7 @@ export function HeaderDropdown({
|
|||||||
return (
|
return (
|
||||||
<Menu.Root>
|
<Menu.Root>
|
||||||
<Menu.Trigger label={_(msg`Thread options`)}>
|
<Menu.Trigger label={_(msg`Thread options`)}>
|
||||||
{({props}) => (
|
{({props: {onPress, ...props}}) => (
|
||||||
<Button
|
<Button
|
||||||
label={_(msg`Thread options`)}
|
label={_(msg`Thread options`)}
|
||||||
size="small"
|
size="small"
|
||||||
@@ -28,6 +29,10 @@ export function HeaderDropdown({
|
|||||||
color="secondary"
|
color="secondary"
|
||||||
shape="round"
|
shape="round"
|
||||||
hitSlop={HITSLOP_10}
|
hitSlop={HITSLOP_10}
|
||||||
|
onPress={() => {
|
||||||
|
logger.metric('thread:click:headerMenuOpen', {})
|
||||||
|
onPress()
|
||||||
|
}}
|
||||||
{...props}>
|
{...props}>
|
||||||
<ButtonIcon icon={SettingsSlider} size="md" />
|
<ButtonIcon icon={SettingsSlider} size="md" />
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
Reference in New Issue
Block a user