Skip to content

Commit

Permalink
Remove isExpoGo flag and simplify error handling
Browse files Browse the repository at this point in the history
in handlePasswordUpdateWithPress function
  • Loading branch information
Timothy Miller committed Nov 6, 2023
1 parent 5ff9887 commit 8d1451a
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { YStack, useToastController } from '@t4/ui'
import { useRouter } from 'solito/router'
import { PasswordResetComponent } from '@t4/ui/src/PasswordReset'
import { isExpoGo } from 'app/utils/flags'
import { useSupabase } from 'app/utils/supabase/hooks/useSupabase'

export function UpdatePasswordScreen() {
Expand All @@ -12,11 +11,9 @@ export function UpdatePasswordScreen() {
const handlePasswordUpdateWithPress = async (password) => {
const { error } = await supabase.auth.updateUser({ password })
if (error) {
if (!isExpoGo) {
toast.show('Password change failed', {
description: error.message,
})
}
toast.show('Password change failed', {
description: error.message,
})
console.log('Password change failed', error)
return
}
Expand Down

1 comment on commit 8d1451a

@github-actions
Copy link

Choose a reason for hiding this comment

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

✔ EAS production build completed

Android QR IOS QR
Android QR IOS QR

Please sign in to comment.