Skip to content

Commit

Permalink
Change events to use snake case and change properties placement
Browse files Browse the repository at this point in the history
  • Loading branch information
teodorus-nathaniel committed Sep 5, 2023
1 parent 826bffd commit 968d396
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/components/posts/view-post/PostDropDownMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const InnerPostDropDownMenu: FC<DropdownProps> = props => {
}

const buildMenuItems = useCallback(() => {
sendEvent('Open post dropdown menu')
sendEvent('open_post_dropdown_menu')

return (
<>
Expand Down
2 changes: 1 addition & 1 deletion src/components/search/SearchInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ const SearchInput = () => {
},
}

sendEvent('Search', { value })
sendEvent('search', { value })
return nonEmptyStr(value) && router.replace(queryPath, queryPath)
}

Expand Down
2 changes: 1 addition & 1 deletion src/components/spaces/helpers/SpaceDropdownMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export const SpaceDropdownMenu = (props: SpaceDropDownProps) => {
const sendEvent = useSendEvent()

const buildMenuItems = () => {
sendEvent('Open space dropdown menu')
sendEvent('open_space_dropdown_menu')

return (
<>
Expand Down
2 changes: 1 addition & 1 deletion src/components/substrate/SubstrateTxButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ function TxButton({

const api = customNodeApi || subsocialApi

const sendTxEvent = useBuildSendEvent('Create tx')
const sendTxEvent = useBuildSendEvent('create_tx')

const waitMessage = controlledMessage({
message: messages.waitingForTx,
Expand Down
2 changes: 1 addition & 1 deletion src/providers/AnalyticContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export function AnalyticProvider(props: React.PropsWithChildren<{}>) {
const eventProps = {
event_type: name,
device_id: state.deviceId,
...properties,
event_properties: properties,
}
if (!state.amp) {
setQueuedEvents(prev => [...prev, eventProps])
Expand Down

0 comments on commit 968d396

Please sign in to comment.