Skip to content

Commit

Permalink
fix: minor fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Prakhar Agarwal <[email protected]>
  • Loading branch information
Prakhar-Agarwal-byte committed Jul 29, 2024
1 parent e1d1683 commit 7378584
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions app/screens/settings-screen/account/profile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import { useCallback, useEffect, useRef, useState } from "react"
import messaging from "@react-native-firebase/messaging"
import crashlytics from "@react-native-firebase/crashlytics"
import { logLogout } from "@app/utils/analytics"
import { PersistentState } from "@app/store/persistent-state/state-migrations"

gql`
query username {
Expand Down Expand Up @@ -65,10 +64,13 @@ export const ProfileScreen: React.FC = () => {
})
if (data && data.me) {
profiles.push({
username: data.me.username ? data.me.username : `Account ${counter++}`,
username: data.me.username ? data.me.username : `Account ${counter}`,
token,
selected: token === curToken,
})
if (!data.me.username) {
counter += 1
}
}
} catch (err) {
console.error(`Failed to fetch username for token ${token}`, err)
Expand Down Expand Up @@ -148,13 +150,11 @@ export const ProfileScreen: React.FC = () => {
const Profile: React.FC<ProfileProps> = ({ username, token, selected }) => {
const styles = useStyles()
const { LL } = useI18nContext()
const navigation = useNavigation<StackNavigationProp<RootStackParamList>>()
const { persistentState, updateState } = usePersistentStateContext()
const { updateState } = usePersistentStateContext()
const client = useApolloClient()
const [userLogoutMutation] = useUserLogoutMutation({
fetchPolicy: "no-cache",
})
const oldToken = persistentState.galoyAuthToken

const logout = useCallback(async (): Promise<void> => {
try {
Expand Down

0 comments on commit 7378584

Please sign in to comment.