Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix up amplitude events #49

Merged
merged 1 commit into from
Aug 1, 2022
Merged

Fix up amplitude events #49

merged 1 commit into from
Aug 1, 2022

Conversation

mjmayank
Copy link
Collaborator

@mjmayank mjmayank commented Aug 1, 2022

Made some small errors with one field name, and also wanted to optimize where the setID function goes

@@ -71,7 +71,7 @@ const ActivityType: FunctionComponent<ActivityTypeProps> = ({ navigation }) => {

React.useEffect(() => {
sendEvent('page_view', {
screen: 'onboarding__activity',
type: 'onboarding__activity',
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

named this field wrong and want it to be consistent with what i did on web

@@ -101,7 +101,7 @@ export const registerUser = createAsyncThunk(
}

await setStorage(
null,
response.user,
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any idea why this was null before?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At the time, the register endpoint did not return a user object.

@@ -418,6 +417,9 @@ const setStorage = async (
refresh_token?: string,
) => {
if (user) {
if (user.id) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

moved this here so that it's in a more central place

@mjmayank mjmayank merged commit b82f5b3 into main Aug 1, 2022
@mjmayank mjmayank deleted the fix-events branch August 1, 2022 21:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants